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

[BUG] functions in @require library do not exist after just imported from zip #2077

Open
cyfung1031 opened this issue Apr 19, 2024 · 5 comments
Labels

Comments

@cyfung1031
Copy link
Contributor

cyfung1031 commented Apr 19, 2024

Sequence of actions:

  1. export full data (zip, all scripts) from 2.18.0
  2. remove existing beta version
  3. install 2.18.3 beta (downloaded from chrome store)
  4. in the existing tab (like youtube), refresh the tab so that the userscripts shall load

Problem:

XXXX is undefined messages show (because not existing function is called - not provided in the context)
(not just one script. my case is two scripts (say script#A and script#B) )

Expected result:

No Error

Devtools console contents:

Environment:

  • OS: MacOS
  • Browser: Brave 1.65.114 Chromium: 124.0.6367.60 (Official Build) (arm64)
  • Violentmonkey Version: 2.18.3

Remarks

then I reinstalled the script. no use.

Then I created another script to test. (same script meta, just diff. script name). The script ok.

Then script#A and script#B both work.

I believe the @require script was not yet downloaded from internet once "imported from zip"

@cyfung1031 cyfung1031 added the bug label Apr 19, 2024
@cyfung1031 cyfung1031 changed the title [BUG] functions in @require library does not exist after just imported from zip [BUG] functions in @require library do not exist after just imported from zip Apr 19, 2024
@tophf
Copy link
Member

tophf commented Apr 20, 2024

There should be an error in console about missing dependencies. I guess we should immediately download everything right after import and add an option to export dependencies into the backup in order to make it complete.

@cyfung1031
Copy link
Contributor Author

cyfung1031 commented Apr 20, 2024

There should be an error in console about missing dependencies. I guess we should immediately download everything right after import and add an option to export dependencies into the backup in order to make it complete.

Downloading dependencies shall be part of the import process.
The message should change to OK / completed / finished after the downloading

@tophf
Copy link
Member

tophf commented Apr 20, 2024

Actually it already happens, but we don't display the progress now.

@cyfung1031
Copy link
Contributor Author

Actually it already happens, but we don't display the progress now.

I think it could be like update error
If all the network requests are fetched at the same time, the dependency scripts could not be downloaded due to server response.

@tophf
Copy link
Member

tophf commented Apr 22, 2024

No, we make the requests sequentially with a delay.

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

2 participants