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

Assignment to constant variable. #2572

Closed
ViralTaco opened this issue Jan 22, 2018 · 11 comments
Closed

Assignment to constant variable. #2572

ViralTaco opened this issue Jan 22, 2018 · 11 comments

Comments

@ViralTaco
Copy link

DIM v4.35.0 (release):
Manifest loading error Object TypeError: Assignment to constant variable.
Uncaught TypeError: Cannot read property 'profileInfo' of undefined
The 'Access-Control-Allow-Origin' header has a value 'https://www.bungie.net' that is not equal to the supplied origin. Origin 'https://app.destinyitemmanager.com' is therefore not allowed access

@NotAClue
Copy link

yep, I'm seeing this also :)

@james-fry
Copy link

New user here (PC/Battle.net).
Just installed and seeing the same error.
Reported in the UI as:
Error loading Destiny info:
Assignment to constant variable
Reload to retry.

Reload does not work. Assume this is fatal based on info from OP

@james-fry
Copy link

Just to note that the beta does work

@bhollis
Copy link
Contributor

bhollis commented Jan 22, 2018

Looks like an UglifyJS bug:

p is an already defined const. Then it inlines loadManifestRemote, which results in this:

n.reject(new Error(`version mismatch: ${i} ${s}`)))}(p).catch(i=>(p=p,m=m,u.statusText=`${l.t("Manifest.Download")}...`,s.get(`https://www.bungie.net${m}?host=${window.location.hostname}`,{responseType:"blob"})

At the beginning it reassigns p=p for some reason. I'll file a bug with UglifyJS, but in the meantime I'll revert our use of it.

@bhollis
Copy link
Contributor

bhollis commented Jan 22, 2018

Very odd that this didn't happen on Beta.

@bhollis
Copy link
Contributor

bhollis commented Jan 22, 2018

We're back.

@bhollis bhollis closed this as completed Jan 22, 2018
@bhollis
Copy link
Contributor

bhollis commented Jan 22, 2018

Also @james-fry no installation necessary, DIM is a website :-)

@bhollis
Copy link
Contributor

bhollis commented Jan 22, 2018

Aha, the reason it worked on Beta (and in general, for lots of us testing) was because this is the remote-manifest path, and all of us had cached manifest on Beta.

@james-fry
Copy link

By installed, I mean installed the chrome plugin ;)

@SunburnedGoose
Copy link
Member

The issue in Uglify that is related to this, mishoo/UglifyJS#2842

@bhollis
Copy link
Contributor

bhollis commented Jan 23, 2018

Filed mishoo/UglifyJS#2843 for our specific repro.

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

No branches or pull requests

5 participants