Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Uncaught TypeError: Cannot read property 'aud' of undefined at Object.resolve_member #27
The error is in the
The line that errors is
This issue is the rewritten version of:
I would ask you to check on a vanilla chrome (non BCDetect) if the error is triggered as well.
That makes sense. As best I can tell (testing in another browser, without BCDetect) it's not hitting the same issue/getting an error.
I wish this was on a public website so I could just show the issue, but run into this as part of an assessment on client code, so can't share it.
It appears to be happening with code related to auth0 lock. This is the unminified section:
Which is part of the following file:
The JWT that should be being parsed at this stage is (modified to remove specific details, but follows the same structure/keys):
Which payload decodes to:
So that would imply to me that the
To validate in isolation.. should be enough to get an instance of the following and try it out, in theory at least (also taken from the above mentioned code file):
The import for that is:
Which is loaded from the package.json:
So instrumenting that in a little test webpage might illustrate the issue in a more standalone way.
Edit: Downloaded that package, built it and uploaded it to plunkr, putting together a mini test page. Main bit of code is in
Downloaded that, ran locally with
I can't for certain rule out that some instrumentation of BCDetect earlier in the larger codebase causes the value to be undefined at this point.. but since I am having trouble getting the debugger to break on the code in question.. and this isolated test seems to work properly, I may have to call this unreproducible for now..