Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Safari 14.1.2 error -> ReferenceError: Can't find variable: zip #492

Closed
NickKilo opened this issue Feb 27, 2024 · 5 comments
Closed

Safari 14.1.2 error -> ReferenceError: Can't find variable: zip #492

NickKilo opened this issue Feb 27, 2024 · 5 comments

Comments

@NickKilo
Copy link

Hi there,
I've written a code to download a file, which works perfectly in Chrome but in Safari on MacOS (Safari Version 14.1.2 (16611.3.10.1.6)) it returns the message: " ReferenceError: Can't find variable: zip".
This refers to a part of my code in which I create a new zip writer, like:
const zipWriter = new zip.ZipWriter(new zip.BlobWriter("application/zip"));

Is it because this Safari version does not support FileReader/Filewriter?

Thank you in advance for your help.

@NickKilo
Copy link
Author

PS:

  1. I'm using latest release of zip.js (v 2.7.35)
  2. before trying to download, at launch I receive as well this error referring to zip-full.min.js: ' SyntaxError: Unexpected private name #g. Cannot parse class method with private name. '

@gildas-lormeau
Copy link
Owner

The error Unexpected private name #g cannot be thrown on packages published on NPM or Deno. I guess you used the built files from GitHub or a mirror. Anyway, I reverted the changes related to this error on GitHub. Could you try to update zip.js and run again your code?

@NickKilo
Copy link
Author

Hi, thanks for your prompt reply.
I confirm you I'm using the built files from GitHub, downloaded and added to the main app directory.

After updating zip.js with version 2.7.36, I now receive this error in Safari :
Unhandled Promise Rejection: TypeError: options.signal must be AbortSignal
It actually is the same error I was receiving with versions 2.7.34.

Hoping to find a fix to this, thank your for your time.

@gildas-lormeau
Copy link
Owner

gildas-lormeau commented Feb 29, 2024

I don't don't know what you are doing. Please provide some code and the full stack-trace at least.

@gildas-lormeau
Copy link
Owner

I'm converting the issue to a question because using AbortController is not mandatory. Feel free to provide some code if you need some help.

Repository owner locked and limited conversation to collaborators Mar 4, 2024
@gildas-lormeau gildas-lormeau converted this issue into discussion #494 Mar 4, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants