Giter Club home page Giter Club logo

Comments (34)

ian-r-rose avatar ian-r-rose commented on September 15, 2024 1

Thanks for all the help in tracking it down! I can merge the fix and release a patch version today. I'm not entirely sure why Safari chokes on those URLs, but the fix is innocuous enough.

Those unauthorized errors are actually expected (though I wish Safari would not spam the console with them, maybe I can find a way around that). They are some checks for things at various endpoints, along with fallbacks if they fail.

from jupyterlab-github.

ian-r-rose avatar ian-r-rose commented on September 15, 2024

Yikes, I am not sure what is happening there (I don't have a Mac, so it's tough for me to check). Does this do anything useful?

from jupyterlab-github.

michaelaye avatar michaelaye commented on September 15, 2024

I deleted the cookies and cache for localhost but nothing changed.

from jupyterlab-github.

vidartf avatar vidartf commented on September 15, 2024

@michaelaye If you run jupyter lab --debug, does the server log include anything about the redirects?

from jupyterlab-github.

michaelaye avatar michaelaye commented on September 15, 2024

Some 200 GET /api/ stuff but no errors, and it seems to be unrelated.

from jupyterlab-github.

michaelaye avatar michaelaye commented on September 15, 2024

Note, that I have the same problem on 2 different OSX machines, so it's not a mere single-machine upset.

from jupyterlab-github.

ian-r-rose avatar ian-r-rose commented on September 15, 2024

Does it work if you remove the server extension (jupyterlab_github)? You will likely get rate-limited after a few minutes, but that will allow us to narrow down what is happening.

from jupyterlab-github.

michaelaye avatar michaelaye commented on September 15, 2024

Please advise on how to remove the server extension. I only ever saw install commands. ;)

from jupyterlab-github.

ian-r-rose avatar ian-r-rose commented on September 15, 2024

Sure thing :)

You can temporarily disable it by running jupyter serverextension disable jupyterlab_github, and then re-enable it by running jupyter serverextension enable jupyterlab_github

Also, can I ask whether you have set this up using the (now deprecated) OAuth app approach, or the access token approach?

from jupyterlab-github.

michaelaye avatar michaelaye commented on September 15, 2024

I have a "jupyterlab" entry in my OAuth apps in my GH Developer settings, I guess that means it's via OAuth, if the access point is called "jupyterlab" ?

from jupyterlab-github.

ian-r-rose avatar ian-r-rose commented on September 15, 2024

More specifically, which entries do you have in your jupyter_notebook_config.py file, as described here?

from jupyterlab-github.

michaelaye avatar michaelaye commented on September 15, 2024

i do have client_id and client_sceret defined in my notebook config, while I have the OAuth jupyterlab access defined in my GH developer settings. note that this setup works while using Chrome.

from jupyterlab-github.

michaelaye avatar michaelaye commented on September 15, 2024

but of course i can remove the OAuth part in GH if you think it's a problem.

from jupyterlab-github.

ian-r-rose avatar ian-r-rose commented on September 15, 2024

I don't know that it's a problem, but we recently changed the recommended approach to using an access token, rather than client_id and client_secret. I wonder if the same problem arises using that.

from jupyterlab-github.

michaelaye avatar michaelaye commented on September 15, 2024

i disabled the serverextension:

(stable) └─( 2 ) ❱❱❱ jupyter serverextension disable jupyterlab_github                      +9664 14:03 ❰─┘
Disabling: jupyterlab_github
- Writing config: /Users/klay6683/.jupyter

and it still does not work in Safari, while it still works in Chrome.

from jupyterlab-github.

ian-r-rose avatar ian-r-rose commented on September 15, 2024

When disabled, did the warnings on the javascript console change?

from jupyterlab-github.

michaelaye avatar michaelaye commented on September 15, 2024

The promise rejection isn't there:

screenshot 2018-05-10 14 08 35

Note, that these lines were already there BEFORE I entered a user name, just with the Github tab open, is that to be expected?
EDIT: And nothing happened when I entered a user name.

from jupyterlab-github.

ian-r-rose avatar ian-r-rose commented on September 15, 2024

Interesting. The redirects appear to be happening in the interaction with the notebook server, not with GitHub itself. That request is a test to see if the jupyterlab_github extension is present, and it is not even getting past that stage in Safari.

Can you try opening a new browser tab with that link in it to see what happens?

from jupyterlab-github.

michaelaye avatar michaelaye commented on September 15, 2024

screenshot 2018-05-10 14 22 17

from jupyterlab-github.

ian-r-rose avatar ian-r-rose commented on September 15, 2024

Okay, well, that's at least consistent. For a more minimal case, what happens if you remove the query parameter, and just go to https://localhost:8901/github?

from jupyterlab-github.

michaelaye avatar michaelaye commented on September 15, 2024

Then I get a 404: Not found.

from jupyterlab-github.

ian-r-rose avatar ian-r-rose commented on September 15, 2024

Okay, we may be making progress :). It seems like Safari may be treating the trailing slash differently than any other browsers. One more thing to check: how about
https://localhost:8901/github?verylongandconfusingstring?

from jupyterlab-github.

michaelaye avatar michaelaye commented on September 15, 2024

404

from jupyterlab-github.

ian-r-rose avatar ian-r-rose commented on September 15, 2024

I just opened a PR with a possible workaround, any chance you would be able to test if it fixes this? No rush if you can't find time.

from jupyterlab-github.

michaelaye avatar michaelaye commented on September 15, 2024

no change here after installing your PR. Can you point out what slash are you talking about?

from jupyterlab-github.

ian-r-rose avatar ian-r-rose commented on September 15, 2024

Hm, that's unfortunate. I am referring to the slash between the url and the query string. That is to say, I thought that Safari might be getting choked on

 https://localhost:8901/github/?verylongandconfusingstring

vs.

 https://localhost:8901/github?verylongandconfusingstring

from jupyterlab-github.

michaelaye avatar michaelaye commented on September 15, 2024

I still have a slash in that URL.
Here was my installation procedure (from the README.md of your fork):

  1. jupyter labextension install @jupyterlab/github
  2. Did nothing to my jupyter_config where I have client and secret already in
  3. In your remove_trailing_slash I did pip install -e .

As I said, in the Javascript console, I still see:

https://localhost:8901/github/?1526166461199

from jupyterlab-github.

ian-r-rose avatar ian-r-rose commented on September 15, 2024

Ah, it looks like you still installed the published version. If you have cloned the fork, can you try installing the local version by running

jlpm install
jlpm run build
jupyter labextension install .

from the repo directory?

from jupyterlab-github.

michaelaye avatar michaelaye commented on September 15, 2024

oh, darn, you wrote that! Sorry, forgot...

from jupyterlab-github.

michaelaye avatar michaelaye commented on September 15, 2024

This worked, I can now list my repos, but I'm getting a lot of errors in the console:

screenshot 2018-05-12 17 20 16

from jupyterlab-github.

ian-r-rose avatar ian-r-rose commented on September 15, 2024

Can you navigate to and open files? Some of those are expected (though I don't think that it's necessary for Safari to output them all).

from jupyterlab-github.

michaelaye avatar michaelaye commented on September 15, 2024

yes, i can navigate to notebooks and run them.

from jupyterlab-github.

michaelaye avatar michaelaye commented on September 15, 2024

Thank you for debugging this with me! So I guess we can close this? I'm guessing the unauthorized repos are from my other organizations?

from jupyterlab-github.

ian-r-rose avatar ian-r-rose commented on September 15, 2024

Fixed by #56

from jupyterlab-github.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.