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

Error after reopening the project #116

Closed
laicasaane opened this issue Dec 21, 2021 · 6 comments
Closed

Error after reopening the project #116

laicasaane opened this issue Dec 21, 2021 · 6 comments
Assignees
Labels

Comments

@laicasaane
Copy link
Contributor

laicasaane commented Dec 21, 2021

Describe the bug
It was fine the first time I added packages. But after I closed the project and opened it again, the errors will be shown on Console window.

To Reproduce
Steps to reproduce the behavior 1:

  1. Create a new project
  2. Add UpmGitExtension
  3. Open Package Manager > Install Package from Git Repository
  4. Add this repo https://github.com/laicasaane/unity-supplements.git
  5. Close the project
  6. Open the project again
  7. Open Package Manager window
  8. See error

Steps to reproduce the behavior 2:

  1. Create a new project
  2. Add UpmGitExtension
  3. Open Package Manager > Install Package from Git Repository
  4. PASTE this repo url https://github.com/laicasaane/unity-supplements.git
  5. Click the Find Versions button (DO NOT add package to the project)
  6. Close the project
  7. Open the project again
  8. Open Package Manager > Install Package from Git Repository
  9. See error
  10. Select the repo url
  11. Click the Find Versions button
  12. See error + cannot find versions

Workaround

  1. Close the project
  2. Delete this folder Library\GitPackageDatabase
  3. Open the project again
  4. Open Package Manager > Install Package from Git Repository
  5. No error and can find versions

Expected behavior
No error and versions are shown after the project is opened the second time.

Environment (please complete the following information):

  • UpmGitExtension 2.0.0-preview.1
  • Platform: Editor (Windows)
  • Unity version: 2021.2.7

Error log

stdout:
cwd: D:\Projects\ExampleUsingUpmGitExtensions\Library\GitPackageDatabase
Input
  rawRepositoryUrl: https://github.com/laicasaane/unity-supplements.git
  repositoryUrl: https://github.com/laicasaane/unity-supplements.git
  subDir: ./
  id: github.com~laicasaane~unity-supplements
  repoDir: Repositories/github.com~laicasaane~unity-supplements
  outputFile: D:\Projects\ExampleUsingUpmGitExtensions\Library\GitPackageDatabase\Results\github.com~laicasaane~unity-supplements.json

#### Start task to get available packages ####

>> Make directory and change current working directory
cwd: D:\Projects\ExampleUsingUpmGitExtensions\Library\GitPackageDatabase\Repositories\github.com~laicasaane~unity-supplements

>> Check previous result (keep: 5 min)
last modified: 7 minute(s) ago

>> Check .lock file (timeout: 5 min)

>> Lock file cleated: D:\Projects\ExampleUsingUpmGitExtensions\Library\GitPackageDatabase\Results\github.com~laicasaane~unity-supplements.json.lock

>> Fast fetch repo to get refs

>> Get revisions
e79cc2c0e5cce714edce56718964dab8a8f739c7 refs/remotes/origin/develop
e30603d3a4a2e71456b3f8f77aacd93629e25870 refs/remotes/origin/develop-hashset
2ea1b286a7b97921a30b90019f4b1510571642a3 refs/remotes/origin/master
375a838f50d0cf5adcbb264dcccd2c4454984aaf refs/tags/1.0.0
6b2c33a01ea06ff49b08e11aeca3fcfe8ab57fe3 refs/tags/1.1.0
e03ba1335c4de555eda379fba12233d0204871c4 refs/tags/1.1.1
3f40173ed0e929cdbc7abf4414f407d60e737470 refs/tags/1.2.0
33c9c28a043fe2af33817c9b3be45ecfab63a327 refs/tags/2.0.0
0ea246213a2d3da86987be29597245fc3552bdb1 refs/tags/2.1.0
b1c65c433152b6cc5f130a0ba62d9f7fa5ec4bf5 refs/tags/2.1.1
4852f9729f0dbe9809d3d475760590074abcc2d1 refs/tags/2.1.2
eded3fdb0d26bb336aca793021eab9744de81d7a refs/tags/2.1.3
27f4dc162844e7409e9d98d3261be8abc292df08 refs/tags/2.2.0
ead352cda6f8d455f5b76d6ced41d3efc26c88e1 refs/tags/2.2.1
931bd4ee073edbb662800dd7e8e3e6f93926d57a refs/tags/2.2.2
b8a4937d62d800acbcc1187e091cf69b8fcb3264 refs/tags/2.3.0
ada3905eace9e076fc3bca0c533b8770bbb86f00 refs/tags/2.3.1
c8b65be8bd213bb1b10a97ac9cab1240c0716f54 refs/tags/2.3.2
a3e844bac45124e526bf008b996e118159c4ea1c refs/tags/2.3.3
baa05bf7fe9139e32349bb452bac55eec13d1fb6 refs/tags/2.3.4
a8d1639a012c11789a504408b7a39728ee6964af refs/tags/2.3.5
00dbafbbc3e570e77a55948ea50012fee12ad3cd refs/tags/2.4.0
d76ac1524d860772fd18b07317495333669e328c refs/tags/2.4.1
2d4bf7bc61d2e45130673f3d5ac4d86897ec0352 refs/tags/2.4.10
68578d4f152790df902510f4dfce649117c419d4 refs/tags/2.4.11
be6ee6912960ea3e074a1119b2bcdc88a7a8eda0 refs/tags/2.4.12
69b02a29f0cedf1ebedc96fa755569d7622f0f6b refs/tags/2.4.13
0a14e27722a763593aed816620da5f4544a5f535 refs/tags/2.4.14
4cc20a9f261f61b7d7cf279e1fe6f3e68c91cf8d refs/tags/2.4.15
96fdedb9b0807c905a6faec7b3e5231c5bf574a5 refs/tags/2.4.16
014585ca0ea5c78da9fd39b5eade4f161cd94ec3 refs/tags/2.4.17
817d080c859d5d89152ca84b55c68d4a8cf40755 refs/tags/2.4.18
75600a9acf7baf8b8db1fc20aef7e5797ad24b6a refs/tags/2.4.19
f5853863ef43a96ad7d3aa71c0ecc858db827e02 refs/tags/2.4.2
552cc39ba7d252e0edb596104820a2d517904d81 refs/tags/2.4.20
eaa838d2f86aac6d670a68b3f57f716fec579e89 refs/tags/2.4.21
3e2547388fe9f19767fadeb296de90d5c97277d4 refs/tags/2.4.22
4e8b03e5d5502ee2de1c43711759621113e217a1 refs/tags/2.4.23
5ca0ede34143d9b96f03dad0a3eb58c911de348c refs/tags/2.4.24
e5aa413c1667b3bbccba05aad64b5f3404d62ecb refs/tags/2.4.25
814ef5b99bede7e9c9cfdfebe6b67ba42ecc9300 refs/tags/2.4.26
b94d9e4b57d56e1054aef651b2f778eb7e9dcb75 refs/tags/2.4.27
06e0750f005e1534904d101880986523e10e0900 refs/tags/2.4.28
17a8037db8272cfcaad36198af8ee17b46fb3824 refs/tags/2.4.29
89198d2fcc28cc2741cdce0818a48114c95df975 refs/tags/2.4.3
05dce960335b250626920f4e2394b3661429e9da refs/tags/2.4.30
e0c7acab551bd9534425f60dd3a0faa45da9012a refs/tags/2.4.31
ac039fd41c5427001e8ca424b4a74d3bfdf9906a refs/tags/2.4.32
38aa5336b39b15f869904942b94ff5c2f98ef8c0 refs/tags/2.4.33
aad0f573725a0eacc52719a4cd8ed5292603c07d refs/tags/2.4.4
28e984b4e787a1a93e3be1505ad7c97669523c1d refs/tags/2.4.5
69bba54e0c80ea918c07cf4284113f32bc46e940 refs/tags/2.4.6
394db76061045cc4c19e42dd04fead224705bb8d refs/tags/2.4.7
5f8c9ad4b6346e5956fe0f153b33c0445921d892 refs/tags/2.4.8
dc4fa5e9af09e954445937c444ea534d572eacac refs/tags/2.4.9
bb6625a9c35cb4fe4267252832813740e5c66bc1 refs/tags/2.5.0
4f556798b8bd0e6bfc4d5aeb1df85b95303ee8ba refs/tags/2.5.1
27866fff2d904b33aa7a2b5dda2b2afccb996440 refs/tags/2.5.10
19dc11819bd2a1469aa11d5b0029a4f0c0166d58 refs/tags/2.5.11
7e3c74823b034735e8f063279be19525eb08d02a refs/tags/2.5.12
4a31357fac2b2ddc7711c213637d599dc1d984df refs/tags/2.5.13
7327e73b4045df86a4bced37c5ce1c916ad3d79c refs/tags/2.5.14
81ecf23d9bcca8ba7662bcd80cbb71aeeef8c084 refs/tags/2.5.15
8791328c7e921599a1c2f17077b8447828efd5a3 refs/tags/2.5.16
b7c66f5c9566c0c6f57afe819d171525b616360a refs/tags/2.5.17
9e4d6d96a6f8d9d9f30b9fc22b68c84e7867a743 refs/tags/2.5.18
3bae9144953dd02f14ce416258fa5167434115e9 refs/tags/2.5.19
f7ce79a4137898fe45741032ce62b0f0ea41819c refs/tags/2.5.2
0c02d081a98aac498bdafc6f72228dc5e23709bd refs/tags/2.5.20
5e51c712ca7b6eaa62f37b0c90330de562de4f23 refs/tags/2.5.21
cbfef14a8a0e7391b44e6076844c87d16bf39eac refs/tags/2.5.22
26fbf3ce1948cb3ebab723a935f8c84981838c53 refs/tags/2.5.23
e4d519f6f31cc3adb13bea615adee002c01e07b5 refs/tags/2.5.24
67ce6fb3d23a276206cedf83b81dd67bfea9d963 refs/tags/2.5.25
b8d986f80dd04cdffb712abe00612e5f23b3c51d refs/tags/2.5.3
6e189d3df339af0de09a1a87c57e36ee1be1de7a refs/tags/2.5.4
4516463810c0516e03431c3c6e69f6a0b3a188f3 refs/tags/2.5.5
d1a4457655b63beaa5e2b8147688f8ede5c90327 refs/tags/2.5.6
ff949cf64dbf8fab8cc6e66a8368d8c45721f74c refs/tags/2.5.7
317ba158004a8710fb1da454cdc899e293eb40c7 refs/tags/2.5.8
f26c3299ff81e124c56763f4eb73585f0b2124e1 refs/tags/2.5.9
2ea1b286a7b97921a30b90019f4b1510571642a3 refs/tags/2.6.0

hash: 2108057446

>> Lock file will be removed: D:\Projects\ExampleUsingUpmGitExtensions\Library\GitPackageDatabase\Results\github.com~laicasaane~unity-supplements.json.lock
stderr:
previous result has same hash. update modified-timestamp.
fs.js:1234
  binding.utimes(pathModule._makeLong(path), atime, mtime);
          ^

Error: EINVAL: invalid argument, utime 'D:\Projects\ExampleUsingUpmGitExtensions\Library\GitPackageDatabase\Results\github.com~laicasaane~unity-supplements.json'
    at Error (native)
    at Object.fs.utimesSync (fs.js:1234:11)
    at touch (D:\Projects\ExampleUsingUpmGitExtensions\Library\PackageCache\com.coffee.upm-git-extension@2.0.0-preview.1\Editor\Commands\utils.js:56:6)
    at Object.<anonymous> (D:\Projects\ExampleUsingUpmGitExtensions\Library\PackageCache\com.coffee.upm-git-extension@2.0.0-preview.1\Editor\Commands\fetch-packages.js:160:5)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)

UnityEngine.Debug:LogError (object)
Coffee.UpmGitExtension.GitPackageDatabase/<>c__DisplayClass4_0:<Fetch>b__0 (object,System.EventArgs) (at Library/PackageCache/[email protected]/Editor/Coffee.UpmGitExtension/GitPackageDataBase.cs:106)
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()
@laicasaane laicasaane added the bug Something isn't working label Dec 21, 2021
@laicasaane laicasaane changed the title Error when fetch repos after reopening the project Error after reopening the project Dec 21, 2021
@laicasaane
Copy link
Contributor Author

Strangely public repos will cause this error only sometimes. But private repos will cause this error every times.

@mob-sakai
Copy link
Owner

Sorry for my late reply.
Thank you for your reporting!

I will fix it later.

To fix:
nodejs/node#5561

@laicasaane
Copy link
Contributor Author

Hi @mob-sakai, will you release this fix soon? I'm in need of it :(

@seghcder
Copy link

Same issue. Upgraded to Unity 2021LTS, which means we need to use 2.0.0-preview.1 tag, but am now running into this issue.

Also, would be great if 2.0.0 preview.1 could be finalised now Unity 2021 is LTS.

github-actions bot pushed a commit that referenced this issue May 20, 2022
# [2.0.0-preview.2](2.0.0-preview.1...2.0.0-preview.2) (2022-05-20)

### Bug Fixes

* adjust search field ([ce6e2e3](ce6e2e3))
* cannot find PackageManagerToolbar on Unity 2021.3.1 ([658d2d9](658d2d9)), closes [#118](#118)
* error after reopening the project on Windows ([232c6e9](232c6e9)), closes [#116](#116)
* fix compile error ([76fcf88](76fcf88))
* fix refresh items ([d92f601](d92f601))
* Install/uninstall package via UPMClient instead of updating manifest.json directly ([69c6021](69c6021))
* open manifest json in Unity 2021.2 ([7c359d3](7c359d3))
* open manifest json in Unity 2022.2 ([c157eba](c157eba))
* scp format url does not support path query and revision ([bdd9249](bdd9249))
* search field does not work properly ([52f9b95](52f9b95))
* separate same name packages in scoped/git registries ([a012b25](a012b25))
* show in console that UpmGitExtensions v2 is not available in Unity2018 or 2019 ([6658167](6658167)), closes [#117](#117)
* support Unity 2021.1 ([6367f56](6367f56))
* support Unity 2022.1 ([47af5e8](47af5e8))
* support Unity 2022.2 ([94ef69c](94ef69c))
* The namespace name 'Internal' does not exist in the namespace 'UnityEditor.PackageManager.UI' ([a16dc0f](a16dc0f))
* trim revision from url in installation window ([e762ce5](e762ce5))

### Features

* add menu to open cache directory, clear cache and fetch packages ([b642b01](b642b01))
* git repository as registry ([36ce57d](36ce57d))
* open manifest.json from menu ([f8e7f63](f8e7f63))
* share git cache between projects ([be5dd7e](be5dd7e))
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 2.0.0-preview.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

github-actions bot pushed a commit that referenced this issue Jul 1, 2022
# [2.0.0](1.3.4...2.0.0) (2022-07-01)

### Bug Fixes

* adjust search field ([ce6e2e3](ce6e2e3))
* cannot find PackageManagerToolbar on Unity 2021.3.1 ([658d2d9](658d2d9)), closes [#118](#118)
* clear selection ([618b55d](618b55d))
* error after reopening the project on Windows ([232c6e9](232c6e9)), closes [#116](#116)
* fix compile error ([76fcf88](76fcf88))
* fix refresh items ([d92f601](d92f601))
* Install/uninstall package via UPMClient instead of updating manifest.json directly ([69c6021](69c6021))
* newer packages version not updating unless restarting editor ([0c7179d](0c7179d)), closes [#121](#121)
* null pointer exception on package manager window opend ([b46e7ef](b46e7ef))
* open manifest json in Unity 2021.2 ([7c359d3](7c359d3))
* open manifest json in Unity 2022.2 ([c157eba](c157eba))
* scp format url does not support path query and revision ([bdd9249](bdd9249))
* search field does not work properly ([52f9b95](52f9b95))
* separate same name packages in scoped/git registries ([a012b25](a012b25))
* show in console that UpmGitExtensions v2 is not available in Unity2018 or 2019 ([6658167](6658167)), closes [#117](#117)
* support Unity 2021.1 ([6367f56](6367f56))
* support Unity 2022.1 ([47af5e8](47af5e8))
* support Unity 2022.2 ([94ef69c](94ef69c))
* The namespace name 'Internal' does not exist in the namespace 'UnityEditor.PackageManager.UI' ([a16dc0f](a16dc0f))
* trim revision from url in installation window ([e762ce5](e762ce5))
* unintentional changes to package source ([1066ce7](1066ce7))

### Features

* add menu to open cache directory, clear cache and fetch packages ([b642b01](b642b01))
* git repository as registry ([36ce57d](36ce57d))
* open manifest.json from menu ([f8e7f63](f8e7f63))
* share git cache between projects ([be5dd7e](be5dd7e))
* support Unity 2020.2 or later ([557d979](557d979))

### BREAKING CHANGES

* UpmGitExtension v2.x does not work in Unity 2018/2019. (Please use v1.x).
@github-actions
Copy link
Contributor

github-actions bot commented Jul 1, 2022

🎉 This issue has been resolved in version 2.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

No branches or pull requests

3 participants