-
Notifications
You must be signed in to change notification settings - Fork 216
TypeError: Cannot redefine property: $$el at Function.defineProperty (<anonymous>) at Object.e.consoleReference (chrome-extension://elgalmkoelokbchhkhacckoklkejnhcd/build/backend.js:31:83265) at chrome-extension://elgalmkoelokbchhkhacckoklkejnhcd/build/backend.js:31:81185 at j (chrome-extension://elgalmkoelokbchhkhacckoklkejnhcd/build/backend.js:31:78471) #1324
Comments
Hello, thanks for letting us know. |
In chrome when I ran this it returned undefined. |
Please advise with the further course of action, in case I need to change anything. |
Now after clicking to a component which are present in my app it is throwing error but when I ran - Object.getOwnPropertyDescriptor(window, '$$el') it says {value:"There is no component selected", configurable:false, enumerable:false, writable:false} |
one more observation it is specifically breaking for Angular 5 for Angular 6 it is working fine. |
Same error here. Any ideas on a fix? |
It happens on clean install of Firefox (MacOS) with only Augury extension being installed. |
Can we fix this by: diff --git a/src/backend/backend.ts b/src/backend/backend.ts
index a6817f3..8f2bebb 100644
--- a/src/backend/backend.ts
+++ b/src/backend/backend.ts
@@ -444,14 +444,16 @@ export const routerTree = (): Array<any> => {
};
export const consoleReference = (node: Node) => {
- Object.defineProperty(window, selectedComponentPropertyKey, {
- get: () => {
- if (node) {
- return ng.probe(node.nativeElement());
+ if (!Object.getOwnPropertyDescriptor(window, selectedComponentPropertyKey)) {
+ Object.defineProperty(window, selectedComponentPropertyKey, {
+ get: () => {
+ if (node) {
+ return ng.probe(node.nativeElement());
+ }
+ return null;
}
- return null;
- }
- });
+ });
+ }
}; |
Is it going to be fixed in any upcoming release ?? |
Hello , |
Still having issue on this with latest Angular and Augury canary build. Augury version (required): Augury Canary Build Description of issue: Steps to reproduce:
|
I have just started to use this tool but unable to explore it further because of this issue. Is there any quick fix ? My configurations are same as @maevadevs |
I can also add that it's also happening in Angular 8, i get the same error. [I don't know what's happening but for some reason I cannot upload the images right now, sorry] And this is the result of
|
I'm using Angular 8(accurately 8.2.3) and got the same error. |
I fixed this issue in my PR. You can wait till it's merged or build the extension yourself. |
fix #1324 Define selectedComponentProperty in the way it could be redefined
Augury: 1.19.1
Date: Tue, 31 Jul 2018 03:29:51 GMT
OS: Win64
Description of issue:
-- When selecting a component it throws error 👍
TypeError: Cannot redefine property: $$el
at Function.defineProperty ()
at Object.e.consoleReference (chrome-extension://elgalmkoelokbchhkhacckoklkejnhcd/build/backend.js:31:83265)
at chrome-extension://elgalmkoelokbchhkhacckoklkejnhcd/build/backend.js:31:81185
at j (chrome-extension://elgalmkoelokbchhkhacckoklkejnhcd/build/backend.js:31:78471)
Angular version (required): 5
Steps to reproduce:
ypeError: Cannot redefine property: $$el
at Function.defineProperty ()
at Object.e.consoleReference (chrome-extension://elgalmkoelokbchhkhacckoklkejnhcd/build/backend.js:31:83265)
at chrome-extension://elgalmkoelokbchhkhacckoklkejnhcd/build/backend.js:31:81185
at j (chrome-extension://elgalmkoelokbchhkhacckoklkejnhcd/build/backend.js:31:78471)
The text was updated successfully, but these errors were encountered: