Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes on Pandas with Macbook M1 #57

Open
mick-net opened this issue Aug 12, 2021 · 5 comments
Open

Crashes on Pandas with Macbook M1 #57

mick-net opened this issue Aug 12, 2021 · 5 comments

Comments

@mick-net
Copy link

mick-net commented Aug 12, 2021

This might be a Pyodide issue, but it seems that Starboard works incorrectly on my new Macbook Pro M1 (Apple ARM sillcon).
In Chrome I get an Error 11 (Crash).

It happens for the normal Python pandas matplotlib demo.
I asked a friend on a non-M1 and it worked all fine (except giving warnings).

Notebook:
https://starboard.gg/#python

It runs until: # x = df.loc[:, ['mpg']]
Then the object turns gray and crashes the Chrome tab.

Screen Shot 2021-08-12 at 17 24 20

Tested with Safari, Chrome, and version 12.3

@unhott
Copy link
Contributor

unhott commented Aug 12, 2021

Hey vermaat,
I tried to figure out what Google Chrome error 11 is, but everything I could find said it was an error for 'update server not available'. A few random sites seemed to suggest clearing browsing data may solve this issue, but that error doesn't seem to even fit this context.
Since I can't really replicate I have a couple of questions.

Does Safari crash as well? What is the error on safari?
Is it possible to try Firefox as well and see if it crashes on all 3?

What happens if you add
df
on line 13? Does that print successfully?

I do think you're right about it probably being a pyodide issue.

@mick-net
Copy link
Author

mick-net commented Aug 12, 2021

Hey vermaat,
I tried to figure out what Google Chrome error 11 is, but everything I could find said it was an error for 'update server not available'. A few random sites seemed to suggest clearing browsing data may solve this issue, but that error doesn't seem to even fit this context.
Since I can't really replicate I have a couple of questions.

Does Safari crash as well? What is the error on safari?
Is it possible to try Firefox as well and see if it crashes on all 3?

What happens if you add
df
on line 13? Does that print successfully?

I do think you're right about it probably being a pyodide issue.

When adding a single 'df' it also crashes in Chrome (gray square over the div of the notebook).
When removing my chrome extensions it fixed it, same for running it with the Chrome Inspector open, or run it in Incognito mode. I will do some more testing to see which extension might be the culprit.

The notebook only loads in Safari in Private mode (I see otherwise only the refresh icon button and the View Source button), but is probably also due to cache/ extensions. So the same cell runs in Safari private mode but the table output is messed up when ending the cell with 'df'. When using 'print(df)' it prints correctly to the console.

In Firefox it works all normal, including the layout of the table when ending the cell with 'df'.

All browsers give the following warning, but I guess that might be normal?

/lib/python3.8/site-packages/pandas/compat/__init__.py:117: UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError.
  warnings.warn(msg)

Chrome: Version 90.0.4430.212 (Official Build) (arm64)
Safari: Version 14.0.3 (16610.4.3.1.4) native m1
Firefox: 90.0.2 (64-bit)

@unhott
Copy link
Contributor

unhott commented Aug 12, 2021

Yes, that warning is normal for the current build of pyodide.
If you do figure out a specific extension that is conflicting with the notebook, Please let us know :)

@gzuidhof
Copy link
Owner

We now register a service worker to add headers that enable us to use Atomics and SharedArrayBuffer, both are not enabled in the current Safari version regardless of these headers being present, so the service worker would always get registered. Perhaps it's problematic in Safari. I can give Safari a run-through later today or tomorrow. As for the error 13 - no clue, let's try to figure out if it's a Pyodide problem. A new pyodide version 0.18.0 just got released - maybe that's worth trying.

@gzuidhof
Copy link
Owner

I got myself some Apple Silicon too now.
I have not been able to reproduce the issue on the homepage in Firefox or Brave (chromium-based). The lzma warning is there, but that can be ignored.

I tried Safari too, and perhaps unsurprisingly it doesn't work :(. Safari really disappoints me with their web compatibility.

It looks like we'll have to hack a special exclusion for Safari in starboard-wrap:

Error while parsing the 'sandbox' attribute: 'allow-downloads' is an invalid sandbox flag.

Finally the ServiceWorker is beyond problematic :(, it shouldn't even be required because of how Starboard.gg hosts its notebooks. Apple's devices are nice, but I wish their browser would just disappear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants