Closed Bug 1449485 Opened 7 years ago Closed 6 years ago

cannot use the given object as a weak map key

Categories

(Core :: DOM: Bindings (WebIDL), defect, P2)

59 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 1351501
Tracking Status
firefox61 --- affected

People

(Reporter: vinay.vemula4, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36 Steps to reproduce: I have implemented leaflet map component in my Application. Actual results: Error: [cannot use the given object as a weak map key] Expected results: Leaflet Map should load successfully.
Please provide a live example that demonstrates the issue. the error can be thrown when you're using some DOM object https://searchfox.org/mozilla-central/rev/028cd8342899357d80fafba2d528a0fd5819e316/js/src/builtin/WeakMapObject-inl.h#26
Component: Untriaged → JavaScript Engine
Flags: needinfo?(vinay.vemula4)
Product: Firefox → Core
(In reply to Tooru Fujisawa [:arai] from comment #1) > Please provide a live example that demonstrates the issue. > > the error can be thrown when you're using some DOM object > https://searchfox.org/mozilla-central/rev/ > 028cd8342899357d80fafba2d528a0fd5819e316/js/src/builtin/WeakMapObject-inl. > h#26 My App is working in Firefox 52.0.2 but I'm getting this error in latest updated version. Examples: 1. https://salesforce.stackexchange.com/questions/154820/typeerror-cannot-use-the-given-object-as-a-weak-map-key 2. https://salesforce.stackexchange.com/questions/198824/d3-js-in-lightning-component-typeerror-cannot-use-the-given-object-as-a-weak these 2 links will says what exactly I'm facing.
Flags: needinfo?(vinay.vemula4)
those pare are not live example, the code there doesn't work alone, and they are not the exact same thing, and I think also different than your case. please provide the testcase of your case.
Flags: needinfo?(vinay.vemula4)
(In reply to Tooru Fujisawa [:arai] from comment #3) > those pare are not live example, the code there doesn't work alone, those *pages
(In reply to Tooru Fujisawa [:arai] from comment #4) > (In reply to Tooru Fujisawa [:arai] from comment #3) > > those pare are not live example, the code there doesn't work alone, > those *pages My scenario is to display a geo map on web page. like this, http://leafletjs.com/index.html I have used the leaflet js library for my component. http://leafletjs.com/download.html Leaflet 1.3.1 - http://cdn.leafletjs.com/leaflet/v1.3.1/leaflet.zip my error is: [cannot use the given object as a weak map key] n()@https://xxxxxxx/javascript/a24vMs8Ru7Q5OyxXWeHeyg/aura_prod.js:4:277 a()@https://xxxx/javascript/a24vMs8Ru7Q5OyxXWeHeyg/aura_prod.js:4:403 get/<()@https://xxxxxx/javascript/a24vMs8Ru7Q5OyxXWeHeyg/aura_prod.js:24:77477 {anonymous}()@https://xxxxx/leaflet.js:17:25431 {anonymous}()@https://xxxxx/leaflet.js:17:140 {anonymous}()@https://xxxxx/leaflet.js:17:2 {anonymous}()@https://xxxxx/leaflet.js:11:2 {anonymous}()@https://xxxxx/leaflet.js:7:17
Flags: needinfo?(vinay.vemula4)
If your actual page is not public, can you create a simplified testcase in public area, like jsfiddle? otherwise this is not actionable.
Flags: needinfo?(vinay.vemula4)
(In reply to Tooru Fujisawa [:arai] from comment #6) > If your actual page is not public, can you create a simplified testcase in > public area, like jsfiddle? > otherwise this is not actionable. I have developed sample app in jsfiddle, but its working fine. below is the link for that app. https://jsfiddle.net/4d4fgLqe/20/ I'm implementing same application with in salesforce lightning environment with JavaScript only. Its working good in all latest Browsers. Like Chrome, Edge, Safari and older versions of Firefox 44.x to 52.0.2 Now I'm updated to latest version of Firefox 59.0.2, then I'm getting the above error.
Flags: needinfo?(vinay.vemula4)
(casually, passing through) I get CSP errors on that page, though in my case it might be NoScript's fault.
Flags: needinfo?(arai.unmht)
Priority: -- → P2
I don't see any error on https://jsfiddle.net/4d4fgLqe/20/ while navigating map by click, drag, or zoom with buttons, and also don't see CSP errors. tested on 59.0.2 (64-bit) with clean profile on macOS. Then, there's no "aura_prod.js" file used in the page, so I think you're doing something different on your application, in addition to the leaflet things. (I guess it's part of salesforce env?)
Flags: needinfo?(arai.unmht) → needinfo?(vinay.vemula4)
Yes, Here this https://jsfiddle.net/4d4fgLqe/20/ is working well in all versions of Firefox. But my issue is, when I'm trying to execute same code through salesforce environment, Its working good in older versions of Firefox 44.x to 52.0.2. But if I installed/updated to Firefox to 59.0.2 (64-bit) version then I'm getting that above listed error. And "aura_prod.js" is salesforce js library I don't have access to modify that, Even I posted a bug in salesforce regarding this issue. May be that will have an error. Thanks for your time.
Flags: needinfo?(vinay.vemula4)
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Component: JavaScript Engine → DOM: Bindings (WebIDL)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.