jupyter-ui icon indicating copy to clipboard operation
jupyter-ui copied to clipboard

Save from notebookActions is not working anymore

Open BrandonEscamilla opened this issue 1 year ago • 3 comments

The following snippet is the one I've been using with previous versions. I'm not really sure what's the reason it's not working anymore.

onClick={e => {
            e.preventDefault();
            dispatch(
              notebookActions.save.started({uid: notebookId, date: new Date()})
            );
          }}

I receive the following error: CleanShot 2024-04-08 at 19 11 11

Also in the console I can see:

Access to fetch at 'https://myjupyterserver.com/api/jupyter/api/contents/kernel-a2f3db0c-9942-4d78-bd00-1f7f99f45562?content=0&hash=1&1712596308613' from origin 'https://myclient.com' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains multiple values 'https://myclient1.com, https://myclient2.com, http://localhost:3000', but only one is allowed. Have the server send the header with a valid value, or, if an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

GET https://myjupyterserver.com/api/jupyter/api/contents/kernel-a2f3db0c-9942-4d78-bd00-1f7f99f45562?content=0&hash=1&1712596308613 net::ERR_FAILED 404 (Not Found)


CleanShot 2024-04-08 at 19 20 22

I'm using version 0.9.8 of jupyter-react and next.js 14. Thanks in advance!

BrandonEscamilla avatar Apr 08 '24 17:04 BrandonEscamilla

This maybe (not sure) an similar issue as the one reported by @dbhagesh on https://github.com/datalayer/jupyter-ui/issues/195

I will find some time this week to investigate.

echarles avatar Apr 08 '24 17:04 echarles

Thank you @echarles!

BrandonEscamilla avatar Apr 09 '24 16:04 BrandonEscamilla

@BrandonEscamilla Can you try with 0.10.0? I was not able to reproduce the specific issue you reported, but brought a fix for another similar issue https://github.com/datalayer/jupyter-ui/issues/195#issuecomment-2053937986

echarles avatar Apr 14 '24 07:04 echarles