Sage 9.0 macOS Jupyter Server failed to start

296 views
Skip to first unread message

Murray Eisenberg

unread,
Jan 5, 2020, 2:39:50 PM1/5/20
to sage-support
When I open SageMath-9.0.app under macOS Catallina (10.15.2), I get an immediate pop-up error window saying, "Jupyter Server failed to start". 

The log shows:

┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.0, Release Date: 2020-01-01                     │
│ Using Python 3.7.3. Type "help()" for help.                        │
└────────────────────────────────────────────────────────────────────┘
Please wait while the Sage Jupyter Notebook server starts...

However, I can get the Jupyter server to start with an indirect method that was never required in earlier versions of SageMath-x.x.app, namely:
  1. In Finder, Show package contents for SageMath-9.0.app.
  2. Navigate in Finder to Contents/MacOS.
  3. Double-click Sage.
That both starts the server and opens the expected client window in Safari, from which I can open and evaluate cells in an existing notebook or create a new SageMath 9.0 notebook.

So something that used to be "hooked up" between the SageMath-x.x.app and the command to start the jupyter server has been broken with 9.0.


Murray Eisenberg

unread,
Jan 5, 2020, 3:51:32 PM1/5/20
to sage-support
Note that I can first start sage in Terminal (by executing there /Applications/SageMath-9.0-app/sage) Terminal, then from the sage command line execute: !sage -n jupyter

Steve Emmett

unread,
Mar 17, 2020, 11:04:16 AM3/17/20
to sage-support
I am having maybe a similar issue. Im on MacOS 10.15.3  I've successfully used 8.9 for quite a while.  I downloaded sage-9.0-OSX_10.15.2-x86_64.app.dmg.
I did the install selected SageMath-9.0.app in Applications.

Safari starts up and overlaid on that screen is the following error message:

Screen Shot 2020-03-17 at 101002 .png

The only log entry is:


shell-init: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted.


Maybe not exactly like your but I would tend to agree that something that was hooked up in pre Sage 9.x is now not there in Sage 9.x






On Sunday, January 5, 2020 at 2:39:50 PM UTC-5, Murray Eisenberg wrote:

slelievre

unread,
Mar 17, 2020, 8:19:09 PM3/17/20
to sage-support
We often get reports of

   SageMath 8.x works but not SageMath 9.0

but it usually turns out that in such cases, the version that works
was installed under macOS 10.14 Mojave, and that what is
causing problems is that the version that fails to work was
installed under macOS 10.15 Catalina.

Have a look at previous such reports:

- Mac OS Catalina Does Not Allow Launching Sage

- how to unlock sagemath 8.8 on MacOS 10.15 Catalina?

- New SageMath 9.0 installation not running on Catalina

- Sage 9.0 installation issues on macOS 10.15.2 Catalina

Let us know if any solution proposed there solves your problem.

Steve Emmett

unread,
Mar 18, 2020, 1:17:26 PM3/18/20
to sage-support
No Joy.  i was hopeful the spctl would help but no success.  But the problem has changed.

the log file now shows "Rewritiing paths for your new installation directory" and proceeds to show a lot of patching entries.
I've tried the reinstall 3 times and each time, the patching log entries fail at:


Thats exactly how the log file looks - part of the path is missing and the error previously show about Jupyter not starting pops up.

Does this suggest anything?

Richard W Bump

unread,
Mar 18, 2020, 1:53:28 PM3/18/20
to sage-support
I had the same problem, but I noticed during my install it was incomplete, although it said it was complete, I just repeatedly installed it until I saw the script finish.  

rana-aere

unread,
Mar 19, 2020, 2:35:31 PM3/19/20
to sage-support
I think SageMath-9.0.app has less records in log file.
I suspect it is not anything planned.
When SageMath-9.0.app terminates abnormally, some messages for log file is lost.
This loss has one explanation, which is the --line-buffered option of grep is turned off in SageMath-9.0.app.
Since I believe this support-group is for asking things to developers, I propose two thing:
Dear developers, please turn on --line-buffered option in AppController.m
                       " grep -i --context 1 'Notebook is running at' |"
                        " grep -o http://.*",
                       " grep -i  --line-buffered --context=1 'Notebook is running at' |"
                       " grep  --line-buffered -o http://.*",
Note also the character "=". This is causing an error currently.
(I myself used hex editor to fix this. But this solution is only recommended for programmers.)
Please turn on other switches so that the other messages for log file will be recorded.
Currently, I do not see version numbers of Sage-9.0 in log file.
I think informative log file will help the community to identify the real bottle neck.

Dima Pasechnik

unread,
Mar 19, 2020, 2:39:05 PM3/19/20
to sage-support
as a matter of fact, we might currently be lacking developers with
knowledge of these MacOS-specific things. (I suggest that
SageMath-*.app should not be used, instead use terminal-based ways to
start Sage)
> --
> You received this message because you are subscribed to the Google Groups "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/f27bc0de-c3f8-410c-8fe4-3410d8bb16a4%40googlegroups.com.

rana-aere

unread,
Mar 19, 2020, 3:24:13 PM3/19/20
to sage-support
I am interested in one aspect.
For "security", MacOS might restrict softwares access to directories.
If someone tries this and find some difference, maybe some more users will be helped.

Step 1. Remove the /Applications/SageMath-9.0.app which does not work.
(This test is for such SageMath-9.0.app. If it is working do not remove it since the test does not make sense anyway.) The application might be shown /Applications/SageMath-9.0 in Finder.

Step 2. In the Terminal window of an administrator's account, use this command:
$ open -a /Applications/SageMath-9.0.app

The first command changes the working directory to SAGE_ROOT.
The second command tells the full pathname to the application and invoke it.

I surfed through the internet and found the error message is from bash.
It tells bash found no current working directory when it is invoked.

If Step 2 is OK, please proceed to the next step.

Step 3. Quit SageMath.app and the browser. Then, double click /Applications/SageMath-9.0.app.

If Step 3 fails, then please proceed to the next step.

Step 4. Try the procedure of Step 2 again.

I will try to find what is going on there on the isolated island Catalina.

2020年3月18日水曜日 0時04分16秒 UTC+9 Steve Emmett:

rana-aere

unread,
Mar 19, 2020, 3:27:18 PM3/19/20
to sage-support
Yes, I am aware of it.
I have intension to help developing Mac Application.
In August, I can spare time to try compilation and rewriting Mac specific codes.
Currently, I am hesitating because of so may prerequisites or dependencies.

2020年3月20日金曜日 3時39分05秒 UTC+9 Dima Pasechnik:

Dima Pasechnik

unread,
Mar 20, 2020, 4:08:40 AM3/20/20
to sage-support


On Friday, March 20, 2020 at 3:27:18 AM UTC+8, rana-aere wrote:
Yes, I am aware of it.
I have intension to help developing Mac Application.
In August, I can spare time to try compilation and rewriting Mac specific codes.
Currently, I am hesitating because of so may prerequisites or dependencies.

The patch you propose is now on

Would be great if someone reviewed it.

rana-aere

unread,
Mar 20, 2020, 4:45:17 AM3/20/20
to sage-support
Thank you for making the ticket and making a patch.

I think the code is now right.
I am still unable to compile it for test.

Here is a partial method for test.
```
$ cat sage.log | grep -i --line-buffered --context=1 'Notebook is running at' | grep --line-buffered -o -e "http://.*"
```

(Another minor change is insertion of "-e". This change does affect the action in normal circumstances.
But I found it when I tested the code again.)

Do I need to take part in GitHub for reviewing the patch?
And may be I should ask someone to invite me in Sagemath developer's group?


2020年3月20日金曜日 17時08分40秒 UTC+9 Dima Pasechnik:

Dima Pasechnik

unread,
Mar 20, 2020, 5:57:22 AM3/20/20
to sage-support
On Fri, Mar 20, 2020 at 4:45 PM rana-aere <rana-...@air.nifty.jp> wrote:
>
> Thank you for making the ticket and making a patch.
>
> I think the code is now right.
> I am still unable to compile it for test.

Why is that? I suppose with a complete installation of Xcode and its
command-line tools,
it should work, using src/mac-app/Makefile
But it might be you'd need to have Sage built from source first. For
this, it's probably
easiest to do it using Conda or Homebrew, so that many packages from
either Conda or
Homebrew may be used.

>
> Here is a partial method for test.
> ```
> $ cat sage.log | grep -i --line-buffered --context=1 'Notebook is running at' | grep --line-buffered -o -e "http://.*"
> ```
>
> (Another minor change is insertion of "-e". This change does affect the action in normal circumstances.
> But I found it when I tested the code again.)
>
> Do I need to take part in GitHub for reviewing the patch?
The easiest way to be able to participate in Sagemath development is to have a
Github account, indeed (and basic Github accounts are free).

> And may be I should ask someone to invite me in Sagemath developer's group?
>
I believe you can use the usual Google Groups interface to request
membership there, no?

HTH
Dmitrii

>
> 2020年3月20日金曜日 17時08分40秒 UTC+9 Dima Pasechnik:
>>
>>
>>
>> On Friday, March 20, 2020 at 3:27:18 AM UTC+8, rana-aere wrote:
>>>
>>> Yes, I am aware of it.
>>> I have intension to help developing Mac Application.
>>> In August, I can spare time to try compilation and rewriting Mac specific codes.
>>> Currently, I am hesitating because of so may prerequisites or dependencies.
>>
>>
>> The patch you propose is now on
>> https://trac.sagemath.org/ticket/29371
>>
>> Would be great if someone reviewed it.
>
> --
> You received this message because you are subscribed to the Google Groups "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/d25ef0a5-70d8-4e06-9f76-720d5ce5e4cc%40googlegroups.com.

slelievre

unread,
Mar 20, 2020, 10:19:11 AM3/20/20
to sage-support
Fri 2020-03-20 08:45:17 UTC, rana-aere:

>
> Thank you for making the ticket and making a patch.
>
> I think the code is now right.
>
> [...]

>
> Do I need to take part in GitHub for reviewing the patch?
> And may be I should ask someone to invite me in Sagemath
> developer's group?

If by "SageMath developer group" you mean ability to edit
Sage Trac tickets: you can log in to the Sage Trac server
- either with a GitHub identifier if you have one
- or without a GitHub identifier, see the section
  "Legacy Account Request" section on Sage Trac:
  https://trac.sagemath.org

If you mean the mailing list "sage-devel" on Google Groups,
I think you can just visit the sage-devel page and post there
by clicking the red button "New Topic" at the top of the page:
https://groups.google.com/forum/#!forum/sage-devel

Samuel

rana-aere

unread,
Mar 22, 2020, 6:45:46 AM3/22/20
to sage-support
Thank you for your reply.
I am trying to compile Sagemath.
I will verify my proposed code.


2020年3月20日金曜日 18時57分22秒 UTC+9 Dima Pasechnik:

rana-aere

unread,
Mar 29, 2020, 10:53:22 AM3/29/20
to sage-support
I solved the first form of bug reported here.
Another one about getcwd seems to be an issue specific to Catalina.
I will work on it.
Reply all
Reply to author
Forward
0 new messages