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

Freshly initialized repository shows 'History' of other recently viewed repository #1088

Closed
guyer opened this issue Mar 13, 2022 · 5 comments
Labels
bug Good first issue Good first issue to be tackled by new contributors status:Help Wanted

Comments

@guyer
Copy link

guyer commented Mar 13, 2022

Description

Freshly initialized repository shows 'History' of other recently viewed repository.

image
image

Reproduce

  1. Create an empty directory
  2. Select git icon tab
  3. Click "Initalize a Repository"
  4. Select 'History' subtab
  5. See history of last-viewed repository

After making a commit, history is as expected.

Expected behavior

I expect to see no history in a freshly initialized and empty repository directory

Context

  • Python package version:
# packages in environment at /Users/teaching/anaconda3:
#
# Name                    Version                   Build  Channel
jupyterlab-git            0.34.2             pyhd8ed1ab_0    conda-forge
  • Extension version:
JupyterLab v3.2.1
/Users/teaching/anaconda3/share/jupyter/labextensions
        nbdime-jupyterlab v2.1.1 enabled OK
        @jupyterlab/git v0.34.2 enabled OK (python, jupyterlab-git)
        @jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)

Other labextensions (built into JupyterLab)
   app dir: /Users/teaching/anaconda3/share/jupyter/lab
  • Git version:
git version 2.32.0 (Apple Git-132)
  • Operating System and its version:
    • macOS Big Sur 11.6.4
    • Windows 11 Home 21H2 22000.318
Command Line Output See https://gist.github.com/guyer/802b31ce65b9f132f89797ba47b35eea
Web Browser Output
remoteEntry.e72301ad2381112336b1.js:1 Unsatisfied version 3.2.1 of shared singleton module @jupyterlab/application (required ^3.3.0-alpha.16)
d @ remoteEntry.e72301ad2381112336b1.js:1
remoteEntry.e72301ad2381112336b1.js:1 Unsatisfied version 3.2.1 of shared singleton module @jupyterlab/codeeditor (required ^3.3.0-alpha.16)
d @ remoteEntry.e72301ad2381112336b1.js:1
remoteEntry.e72301ad2381112336b1.js:1 Unsatisfied version 5.2.1 of shared singleton module @jupyterlab/coreutils (required ^5.3.0-alpha.16)
d @ remoteEntry.e72301ad2381112336b1.js:1
remoteEntry.e72301ad2381112336b1.js:1 No satisfying version (^3.3.0-alpha.16) of shared module @jupyterlab/outputarea found in shared scope default.
Available versions: 3.2.1 from @jupyterlab/application-top
p @ remoteEntry.e72301ad2381112336b1.js:1
remoteEntry.e72301ad2381112336b1.js:1 No satisfying version (^3.3.0-alpha.16) of shared module @jupyterlab/docregistry found in shared scope default.
Available versions: 3.2.1 from @jupyterlab/application-top
p @ remoteEntry.e72301ad2381112336b1.js:1
remoteEntry.e72301ad2381112336b1.js:1 No satisfying version (^3.3.0-alpha.16) of shared module @jupyterlab/nbformat found in shared scope default.
Available versions: 3.2.1 from @jupyterlab/application-top
p @ remoteEntry.e72301ad2381112336b1.js:1
remoteEntry.e72301ad2381112336b1.js:1 Unsatisfied version 6.2.1 of shared singleton module @jupyterlab/services (required ^6.3.0-alpha.16)
d @ remoteEntry.e72301ad2381112336b1.js:1
remoteEntry.e72301ad2381112336b1.js:1 Unsatisfied version 3.2.1 of shared singleton module @jupyterlab/rendermime (required ^3.3.0-alpha.16)
d @ remoteEntry.e72301ad2381112336b1.js:1
remoteEntry.e72301ad2381112336b1.js:1 Unsatisfied version 3.2.1 of shared singleton module @jupyterlab/docmanager (required ^3.3.0-alpha.16)
d @ remoteEntry.e72301ad2381112336b1.js:1
remoteEntry.e72301ad2381112336b1.js:1 Unsatisfied version 3.2.1 of shared singleton module @jupyterlab/codemirror (required ^3.3.0-alpha.16)
d @ remoteEntry.e72301ad2381112336b1.js:1
remoteEntry.e72301ad2381112336b1.js:1 Unsatisfied version 3.2.1 of shared singleton module @jupyterlab/translation (required ^3.3.0-alpha.16)
d @ remoteEntry.e72301ad2381112336b1.js:1
remoteEntry.e72301ad2381112336b1.js:1 Unsatisfied version 3.2.1 of shared singleton module @jupyterlab/filebrowser (required ^3.3.0-alpha.16)
d @ remoteEntry.e72301ad2381112336b1.js:1
remoteEntry.e72301ad2381112336b1.js:1 Unsatisfied version 3.2.1 of shared singleton module @jupyterlab/statusbar (required ^3.3.0-alpha.16)
d @ remoteEntry.e72301ad2381112336b1.js:1
remoteEntry.e72301ad2381112336b1.js:1 Unsatisfied version 3.2.1 of shared singleton module @jupyterlab/settingregistry (required ^3.3.0-alpha.16)
d @ remoteEntry.e72301ad2381112336b1.js:1
remoteEntry.e72301ad2381112336b1.js:1 Unsatisfied version 3.2.1 of shared singleton module @jupyterlab/mainmenu (required ^3.3.0-alpha.16)
d @ remoteEntry.e72301ad2381112336b1.js:1
remoteEntry.e72301ad2381112336b1.js:1 Unsatisfied version 3.2.1 of shared singleton module @jupyterlab/ui-components (required ^3.3.0-alpha.15)
d @ remoteEntry.e72301ad2381112336b1.js:1
remoteEntry.e72301ad2381112336b1.js:1 Unsatisfied version 3.2.1 of shared singleton module @jupyterlab/apputils (required ^3.3.0-alpha.16)
d @ remoteEntry.e72301ad2381112336b1.js:1
1902.84e773fc133a804e6fdf.js?v=84e773fc133a804e6fdf:2 $ref: keywords ignored in schema at path "#/properties/codeCellConfig"
e @ 1902.84e773fc133a804e6fdf.js?v=84e773fc133a804e6fdf:2
1902.84e773fc133a804e6fdf.js?v=84e773fc133a804e6fdf:2 $ref: keywords ignored in schema at path "#/properties/markdownCellConfig"
e @ 1902.84e773fc133a804e6fdf.js?v=84e773fc133a804e6fdf:2
1902.84e773fc133a804e6fdf.js?v=84e773fc133a804e6fdf:2 $ref: keywords ignored in schema at path "#/properties/rawCellConfig"
e @ 1902.84e773fc133a804e6fdf.js?v=84e773fc133a804e6fdf:2
1902.84e773fc133a804e6fdf.js?v=84e773fc133a804e6fdf:2 $ref: keywords ignored in schema at path "#/properties/codeCellConfig"
e @ 1902.84e773fc133a804e6fdf.js?v=84e773fc133a804e6fdf:2
1902.84e773fc133a804e6fdf.js?v=84e773fc133a804e6fdf:2 $ref: keywords ignored in schema at path "#/properties/markdownCellConfig"
e @ 1902.84e773fc133a804e6fdf.js?v=84e773fc133a804e6fdf:2
1902.84e773fc133a804e6fdf.js?v=84e773fc133a804e6fdf:2 $ref: keywords ignored in schema at path "#/properties/rawCellConfig"
e @ 1902.84e773fc133a804e6fdf.js?v=84e773fc133a804e6fdf:2
jlab_core.075245c92eb560303156.js?v=075245c92eb560303156:2 Starting application in workspace: "default"
jlab_core.075245c92eb560303156.js?v=075245c92eb560303156:2 Starting WebSocket: ws://localhost:8890/api/kernels/5acc1fd8-a425-4b83-b52e-55feafc50ea8
jlab_core.075245c92eb560303156.js?v=075245c92eb560303156:2 Starting WebSocket: ws://localhost:8890/api/kernels/5acc1fd8-a425-4b83-b52e-55feafc50ea8
jlab_core.075245c92eb560303156.js?v=075245c92eb560303156:2 Starting WebSocket: ws://localhost:8890/api/kernels/5acc1fd8-a425-4b83-b52e-55feafc50ea8
:8890/git/Desktop/test_branch2/log?1647189328881:1          Failed to load resource: the server responded with a status of 500 (Internal Server Error)
269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1 Uncaught (in promise) Error: fatal: your current branch 'master' does not have any commits yet
at ve (:8890/lab/extensions/@jupyterlab/git/static/269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:26945)
at async :8890/lab/extensions/@jupyterlab/git/static/269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:36256
at async Ce.execute (:8890/lab/extensions/@jupyterlab/git/static/269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:27547)
at async Se.log (:8890/lab/extensions/@jupyterlab/git/static/269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:36184)
at async Nn.refreshHistory (:8890/lab/extensions/@jupyterlab/git/static/269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:136117)
at async Nn.refreshView (:8890/lab/extensions/@jupyterlab/git/static/269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:136358)

:8890/git/Desktop/test_branch2/log?1647189328882:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1 Uncaught (in promise) Error: fatal: your current branch 'master' does not have any commits yet

at ve (269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:26945)
at async 269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:36256
at async Ce.execute (269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:27547)
at async Se.log (269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:36184)
at async Nn.refreshHistory (269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:136117)
at async Nn.refreshView (269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:136358)

:8890/git/Desktop/test_branch2/log?1647189363594:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1 Uncaught (in promise) Error: fatal: your current branch 'master' does not have any commits yet

at ve (:8890/lab/extensions/@jupyterlab/git/static/269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:26945)
at async :8890/lab/extensions/@jupyterlab/git/static/269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:36256
at async Ce.execute (:8890/lab/extensions/@jupyterlab/git/static/269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:27547)
at async Se.log (:8890/lab/extensions/@jupyterlab/git/static/269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:36184)
at async Nn.refreshHistory (:8890/lab/extensions/@jupyterlab/git/static/269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:136117)

:8890/git/Desktop/test_branch2/log?1647189396805:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1 Uncaught (in promise) Error: fatal: your current branch 'master' does not have any commits yet

at ve (:8890/lab/extensions/@jupyterlab/git/static/269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:26945)
at async :8890/lab/extensions/@jupyterlab/git/static/269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:36256
at async Ce.execute (:8890/lab/extensions/@jupyterlab/git/static/269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:27547)
at async Se.log (:8890/lab/extensions/@jupyterlab/git/static/269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:36184)
at async Nn.refreshHistory (:8890/lab/extensions/@jupyterlab/git/static/269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:136117)
at async Nn.refreshView (:8890/lab/extensions/@jupyterlab/git/static/269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:136358)

:8890/git/Desktop/test_branch2/log?1647189398036:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1 Uncaught (in promise) Error: fatal: your current branch 'master' does not have any commits yet

at ve (:8890/lab/extensions/@jupyterlab/git/static/269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:26945)
at async :8890/lab/extensions/@jupyterlab/git/static/269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:36256
at async Ce.execute (:8890/lab/extensions/@jupyterlab/git/static/269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:27547)
at async Se.log (:8890/lab/extensions/@jupyterlab/git/static/269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:36184)
at async Nn.refreshHistory (:8890/lab/extensions/@jupyterlab/git/static/269.4e818cfc1607f513a609.js?v=4e818cfc1607f513a609:1:136117)

DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/main.1fc20c20fd6272f9d048.js.map?v=1fc20c20fd6272f9d048: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/7755.d506a1d9dadf30b1e490.js.map?v=d506a1d9dadf30b1e490: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/6700.9bfbe77418dd01d623dd.js.map?v=9bfbe77418dd01d623dd: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/1033.fc4792a37de5b414eb76.js.map?v=fc4792a37de5b414eb76: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/4570.44c948d7eae0f307f23c.js.map?v=44c948d7eae0f307f23c: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/4155.784ca1752696680bf373.js.map?v=784ca1752696680bf373: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/1036.f2d455e7057498f51450.js.map?v=f2d455e7057498f51450: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/7294.46e9d2dfa68082780e97.js.map?v=46e9d2dfa68082780e97: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/9473.f6adb1fcd9ac2f6ab565.js.map?v=f6adb1fcd9ac2f6ab565: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/2719.f0b62700d12f05ae9649.js.map?v=f0b62700d12f05ae9649: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/7084.8cbd74268350b25b03e6.js.map?v=8cbd74268350b25b03e6: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/3935.e00facce2e55a4af6e62.js.map?v=e00facce2e55a4af6e62: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/4631.96a143e70f005fef7b59.js.map?v=96a143e70f005fef7b59: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/1358.9ab4f57e8227ce75f427.js.map?v=9ab4f57e8227ce75f427: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/8086.1dfabaac37d971e2cc4c.js.map?v=1dfabaac37d971e2cc4c: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/2440.b1cec08f1bbdf244e2bb.js.map?v=b1cec08f1bbdf244e2bb: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/1057.1a1aee857cdaddbae1d3.js.map?v=1a1aee857cdaddbae1d3: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/7616.d412fb880534d79eb96c.js.map?v=d412fb880534d79eb96c: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/1249.39ca2df011ac8354b8d2.js.map?v=39ca2df011ac8354b8d2: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/3496.ecb0e7fcc54191234ae6.js.map?v=ecb0e7fcc54191234ae6: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/3502.fbe0c610be82ba1360db.js.map?v=fbe0c610be82ba1360db: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/5815.4b6b9a453a8a559f1470.js.map?v=4b6b9a453a8a559f1470: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/4151.c3dc0e633a876895c62c.js.map?v=c3dc0e633a876895c62c: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/911.0c08f040896753efc653.js.map?v=0c08f040896753efc653: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/4429.9d0e9af89b4ab5bf2a29.js.map?v=9d0e9af89b4ab5bf2a29: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/1902.84e773fc133a804e6fdf.js.map?v=84e773fc133a804e6fdf: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/7796.eb71435b425bb2aea842.js.map?v=eb71435b425bb2aea842: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/807.19c29345bd81fb8caca3.js.map?v=19c29345bd81fb8caca3: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/126.7dbfc7317b0b535d2b27.js.map?v=7dbfc7317b0b535d2b27: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/714.d38baae8faccca175d4b.js.map?v=d38baae8faccca175d4b: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for http://localhost:8890/static/lab/jlab_core.075245c92eb560303156.js.map?v=075245c92eb560303156: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

@guyer guyer added the bug label Mar 13, 2022
@welcome
Copy link

welcome bot commented Mar 13, 2022

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@fcollonval
Copy link
Member

Thanks for reporting the issue @guyer

@fcollonval fcollonval added status:Help Wanted Good first issue Good first issue to be tackled by new contributors labels Mar 15, 2022
@dodo0822
Copy link

It looks like the backend does not handle the situation when git gives an error if the branch does not contain any commits.
image

I think we can try to parse the error message at https://github.com/jupyterlab/jupyterlab-git/blob/master/jupyterlab_git/git.py#L529 and return an empty commit list if the output matches a regex like fatal: your current branch '(.+)' does not have any commits yet.

@shawnesquivel
Copy link
Contributor

shawnesquivel commented Feb 4, 2023

I also reproduced the error that @dodo0822 mentioned. After initializing the repository and clicking History, I get a blank panel (see below), instead of the last repository's history like @guyer mentioned.

image

I also got these two error messages, but I think the fatal error with the master branch not having any commits is the first one to solve.

Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Uncaught TypeError: Cannot read properties of undefined (reading 'yOffset')
Version
  • Juypterlab-git 0.40.1
  • Juypterlab 3.3.2
  • jupyter_server : 1.23.3
  • git version 2.38.0.windows.1
  • Python 3.9.12

@fcollonval
Copy link
Member

Fixed by #1215

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Good first issue Good first issue to be tackled by new contributors status:Help Wanted
Projects
None yet
Development

No branches or pull requests

4 participants