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

Thrown “SCRIPT1028: SCRIPT1028: Expected identifier, string or number” in Edge browser. #5005

Closed
Shawngbk opened this issue Sep 5, 2019 · 4 comments
Labels

Comments

@Shawngbk
Copy link

Shawngbk commented Sep 5, 2019

Hi @southpolesteve

Thanks for your help! Could you please look into the below issue?

When using an Angular app which use the @azure/cosmos and run it at Edge browser, it will hit the below error message.
“SCRIPT1028: SCRIPT1028: Expected identifier, string or number”
Clicking the error, I found the error throwed by the line 39.
After search it, found this github link: https://github.com/sindresorhus/crypto-hash/blob/master/browser.js#L39
This code is part of the ‘crypto-hash.’

It seems that the ‘crypto-hash’ is required if use the @azure/cosmos.

I search again and found below link which indicating that Edge doesn’t support the Rest parameters (the syntax is ‘…options’)
https://stackoverflow.com/questions/53628191/edge-script1028-expected-identifier-string-or-number

Then, the issue seems to be the dead-lock status.
The Angular app use the @azure/cosmos. @azure/cosmos required the ‘crypto-hash’. ‘crypto-hash’ use the Rest parameters. However, the Edge doesn’t support such syntax..
Therefore, the above restriction let the Angular app cannot be used in the Edge browser.

This is a sample which you can simply repro the issue:
https://github.com/jeffrey008/empty-angular

I fully know this might be a pure front-end issue or Edge issue. I still hope to consult from your side and see if there is any idea for resolving the issue.

@southpolesteve southpolesteve transferred this issue from Azure/azure-cosmos-js Sep 5, 2019
@triage-new-issues triage-new-issues bot removed the triage label Sep 5, 2019
@Shawngbk
Copy link
Author

hi @southpolesteve
May I know is there the current ETA for replacing the cypto-hash?

@southpolesteve
Copy link
Contributor

No ETA at this time. We are evaluating making our own crypto shim in #5023

@Shawngbk
Copy link
Author

Appreciate your help!
Looking forward to the further steps.

@southpolesteve
Copy link
Contributor

This was resolved in 3.3.4

azure-sdk pushed a commit that referenced this issue Jan 5, 2023
…" for perf.yml

This reverts commit 81c78afd563a32c224eb45b0cf864078d55b68eb.
azure-sdk pushed a commit that referenced this issue Jan 5, 2023
…" for perf.yml

This reverts commit 81c78afd563a32c224eb45b0cf864078d55b68eb.
azure-sdk added a commit that referenced this issue Jan 5, 2023
…" for perf.yml (#24382)

This reverts commit 81c78afd563a32c224eb45b0cf864078d55b68eb.

Co-authored-by: Mike Harder <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants