I am running the latest beta of macOS Big Sur, and Open Site Shell is not opening at all. Is there a manual way to access the site shell from macOS?
Thank you!
I am running the latest beta of macOS Big Sur, and Open Site Shell is not opening at all. Is there a manual way to access the site shell from macOS?
Thank you!
Hey @aaronmclayton, Welcome to the Local Community Forums and thanks for taking the Beta for a spin!
Itās hard to know what might be failing. Can you please provide your Local Log? See this Community Forum post for instructions on how to do so:
In terms of accessing the shell without the UI ā you might be able to. When you click the āOpen site shellā button in Local, a shell script is created in:
~/Library/Application\ Support/Local/ssh-entry/<site-hash>.sh
If that script is created, you should be able to manually call that script from within a shell to get the necessary context set up.
The main problem I could see happening is that Local wasnāt able to create that script. Can you take a look a the Local log and let us know if there are any errors contained within there?
Unfortunately there are no logs created and no script either.
Maybe thereās something in the Local Beta log?
If you click on āHelp > Reveal Localās Logā it should take you to that location. Depending on the version of Local you are using, you might have different names for that log. Since you mention using the Beta version, youāll want to look for the log named local-beta.log
. Hereās an example of what my folder structure looks like on macOS:
~/Library/logs:
drwx------+ 51 benjamin staff 1632 Sep 28 14:08 .
drwx------+ 77 benjamin staff 2464 Aug 19 09:57 ..
...
-rw-r--r-- 1 benjamin staff 885759 Jul 13 16:02 local-beta.log
...
-rw-r--r-- 1 benjamin staff 726322 Jul 28 08:19 local-by-flywheel.log
...
-rw-r--r-- 1 benjamin staff 387440 Sep 28 20:29 local-lightning.log
...
I have the same problem and Iād like to share some info:
Thanks for that extra info @dgwatkins!
So it sounds like the script was created, but Local didnāt automatically open a terminal for you, is that correct?
A couple of things Iām curious about and would love clarification on:
Was a terminal opened and quickly closed, for example, did you see a flash of a window opening and closing, or did the terminal never actually open in the first place?
What terminal software are you using? ie. the built-in terminal.app
or something else like iterm2.app
?
What shell are you using? ZSH? Bash? other?
As a side note, when I google macos big sur terminal not opening
there are some hits, but most of them talk about the window opening, but the shell not actually being initialized.
Yes, that sounds right.
There is no flashing. I tried with a Terminal already open, expecting a new tab. And I tried completely closing the Terminal. In both cases there was no flash.
I use the Terminal built-in app
Iām using zsh (with oh-my-zsh) but it was working fine until last update from you (a few days ago).
The thing is that I installed macos beta more or less at the same time that I updated Local to the latest version. So I am not sure which one of the 2 updates caused the issue.
Hi there,
I have the same issue!!
Any help would be greatly appreciated.
Hey @mrajasays, Welcome to the Local Community Forums!
As of right now, this appears to be an incompatibility between Local and Big Sur, but Iād love for you to answer the same questions I asked above so that we get a better idea for the real-world settings that are in place:
Hey Ben
I know Big Sur is still in beta, so Iāll keep poking around for a workaround. But I wanted to mention that Iām having the same problem, so +1 to this bug.
-Jack
Thanks for all the feedback everyone ā we have some work planned to take a closer look at these things, but I donāt have an ETA for when it will be worked on and fixed.
In the meantime, I hammered out this shell mess to hopefully allow you to work around this limitation. Basically it allows you to quickly find which shell script you need to run in order to get the environment scaffolded up:
find ~/Library/Application\ Support/Local/ssh-entry/*.sh -exec grep -H 'echo -n -e' {} \; | sed -E 's/^(.*):.*;(.*)Shell\\.*/\2 @ "\1"/' | column -s '@' -t
It might make sense to save that to a file within your path so that you can access it from anywhere:
Thanks for that Ben.
It works much quicker than my current solution (open dev-tools, inspect elements to find the site-id)
One gotcha I didnāt mention ā these site-shell scripts arenāt created when the site is created. Youāll still need to click the āOpen Site Shellā so that it creates that script initially.
From there, the above shell command I posted should get you all of the shells for your sites.
Iām working with last Local version (5.9.2+5056 )and final Big Sur version (11.0.1) and same issue. Workaround with shell script works well.
Hey this topic was two months ago. IT seems the problem persists even past beta. I cant get the site shell to open and I just updated to Big Sur today. Using Version 5.9.2+5056 and MacOS 11.0.1
@ben.turner it seems that Local never cleans up deleted sites, consequently this script can become quite unwieldy with all the results. But thanks, as it works. <3
Oof. I can see how that gets ugly. I donāt have a fix, but doing a little CLI monkeying around with jq, I can see that at the very least on my machine, I donāt have any orphans ā ie, shell scripts that donāt have a corresponding entry in the sites.json
file:
Maybe some of these commands can help others with cleanup?
cd ~/Library/Application\ Support/Local
ls ssh-entry
ls run # each local site's runtime environment
jq -r 'keys[]' sites.json
comm \
<(jq -r 'keys[]' sites.json | sort) \
<(find ssh-entry -maxdepth 1 -mindepth 1 -type f -name '*.sh' | sed -E 's/ssh-entry\/(.*).sh$/\1/' | sort)
But that cleanup definitely would get tedious, so it might be easier to nuke everything and start over ā which is what I end up doing every month or so with the amount of QA I do related to odd, broken sites.
Note, that comm
can be used to only show one of those ācolumnsā so to only see entries that only exist in that second list (ie .sh files), you should be able to do something like this to āsuppress the first and third columnsā:
comm -13 \
<(jq -r 'keys[]' sites.json | sort) \
<(find ssh-entry -maxdepth 1 -mindepth 1 -type f -name '*.sh' | sed -E 's/ssh-entry\/(.*).sh$/\1/' | sort)
Again, none of this actually cleans anything up, it just is meant to help you zero in on what might not actually exist anymore.
For the feature request, removing the specific site shell scripts on a Delete
of the site would be great.
Any ETA of āOpen Site Shellā fix for Big Sur?
Regards.
Bumping this. Also wondering if this will be fixed soon.