ERROR ReferenceError: KEYUTIL is not defined - identityserver4

I have been following this tutorial and so far so good except that I keep getting this error after a successful login or what seems like it
ERROR ReferenceError: KEYUTIL is not defined
at OidcSecurityValidation.validate_signature_id_token (oidc.security.validation.ts:152)
at SafeSubscriber._next (oidc.security.service.ts:116)
at SafeSubscriber.__tryOrUnsub (Subscriber.js:238)
at SafeSubscriber.next (Subscriber.js:185)
at Subscriber._next (Subscriber.js:125)
at Subscriber.next (Subscriber.js:89)
at CatchSubscriber.Subscriber._next (Subscriber.js:125)
at CatchSubscriber.Subscriber.next (Subscriber.js:89)
at MapSubscriber._next (map.js:83)
at MapSubscriber.Subscriber.next (Subscriber.js:89)
defaultErrorLogger # core.es5.js:1084
ErrorHandler.handleError # core.es5.js:1144
next # core.es5.js:4778
schedulerFn # core.es5.js:3851
SafeSubscriber.__tryOrUnsub # Subscriber.js:238
SafeSubscriber.next # Subscriber.js:185
Subscriber._next # Subscriber.js:125
Subscriber.next # Subscriber.js:89
Subject.next # Subject.js:55
EventEmitter.emit # core.es5.js:3837
NgZone.triggerError # core.es5.js:4209
onHandleError # core.es5.js:4170
ZoneDelegate.handleError # zone.js:395
Zone.runTask # zone.js:194
ZoneTask.invoke # zone.js:486
I tried the approach specified in the tutorial that didnt work. I imported the file this way import "./assets/jsrsasign.min.js" in vendor.ts it didnt help either.

Ok so here is what I did to get through. If you are using webpack 2 (that is what I am using)
add the following (depending on your folder arrangements)
new CopyWebpackPlugin([
{ from: './angularApp/assets/*.*', to: 'assets/', flatten: true }
]),
and then referencing in my index.html like this
<script src="assets/jsrsasign.min.js"></script>
the last line in the section

Related

Error: Couldn't find a navigation context. Have you wrapped your app with 'NavigationContainer'?

I'm getting this error on every render. The stack trace below started with a mouse §click. The problem is I have no clue how to approach this. What I gather from this trace is:
It seems to happen inside React
Apparently it happens while React is reconciling the virtual DOM and the real DOM?
Somehow React Navigation has hooked into this process and is complaining.
And here it ends for me.
What am I using:
Expo Go SDK 46
React Native Web 0.18.7
Reactflow 11.2.0
So how do I go about debugging this? BTW I did wrap everything in a navigation container.
console.<computed> # index.js:1
error # react-native-logs.fx.ts:34
overrideMethod # react_devtools_backend.js:4026
i # VM8448:10
t.onCommitFiberRoot.t.onCommitFiberRoot # VM8448:10
onCommitRoot # react-dom.development.js:4875
commitRootImpl # react-dom.development.js:26709
commitRoot # react-dom.development.js:26517
performSyncWorkOnRoot # react-dom.development.js:25956
flushSyncCallbacks # react-dom.development.js:11982
flushSyncCallbacksOnlyInLegacyMode # react-dom.development.js:11961
scheduleUpdateOnFiber # react-dom.development.js:25326
dispatchReducerAction # react-dom.development.js:17269
listener # index.js:138
(anonymous) # index.js:18
setState # index.js:17
(anonymous) # index.ts:21
setNodes # slice.ts:120
(anonymous) # SlideEditorCanvas.tsx:139
(anonymous) # index.js:2308
call # dispatch.js:57
emit # zoom.js:219
start # zoom.js:198
mousedowned # zoom.js:283
(anonymous) # on.js:3

Cannot read property 'func' of undefined

I'm getting the following 2 errors with my React Native project, using Expo in the Simulator.
Can anyone shed any light on what I should be looking to fix? I've seen a couple of people with similar 'undefined' issues but I was unable to a gain a solution from them. I'm not even sure which file I should be looking at! ExceptionsManager.js is a file inside 'node_modules/react-native' so does that mean anything? Any ideas?
Many thanks.
Cannot read property 'func' of undefined - ExceptionsManager.js:65
handleException # ExceptionsManager.js:65
handleError # InitializeCore.js:106
reportFatalError # error-guard.js:46
guardedLoadModule # require.js:133
_require # require.js:118
(anonymous) # config.json:1
executeApplicationScript # debuggerWorker.js:40
(anonymous) # debuggerWorker.js:65
Module AppRegistry is not a registered callable module (calling runApplication) - ExceptionsManager.js:65
handleException # ExceptionsManager.js:65
handleError # InitializeCore.js:106
reportFatalError # error-guard.js:46
__guard # MessageQueue.js:267
callFunctionReturnFlushedQueue # MessageQueue.js:115
(anonymous) # debuggerWorker.js:72

How to configure este to work with react-toolbox?

As recomended in este wiki, I would like to use react-toolbox to create components in material design. I have installed react-toolbox with npm. I got this error while trying to use button.
ERROR in ./~/css-loader!./~/postcss-loader!./~/react-toolbox/lib/button/theme.css
Module build failed: Error: No PostCSS Config found in: /home/alenka/Documents/bakalárka/esteDir/este/node_modules/react-toolbox/lib/button
at Error (native)
at /home/alenka/Documents/bakalárka/esteDir/este/node_modules/postcss-load-config/index.js:51:26
# ./~/react-toolbox/lib/button/theme.css 4:14-100 13:2-17:4 14:20-106
# ./~/react-toolbox/lib/button/index.js
# ./src/browser/home/HomePage.js
# ./src/browser/app/routeConfig.js
# ./src/browser/app/Root.js
# ./src/browser/main.js
# ./src/browser/index.js
# multi webpack-hot-middleware/client?path=http://192.168.1.41:8080/__webpack_hmr ./src/browser/index.js
ERROR in ./~/css-loader!./~/postcss-loader!./~/react-toolbox/lib/ripple/theme.css
Module build failed: Error: No PostCSS Config found in: /home/alenka/Documents/bakalárka/esteDir/este/node_modules/react-toolbox/lib/ripple
at Error (native)
at /home/alenka/Documents/bakalárka/esteDir/este/node_modules/postcss-load-config/index.js:51:26
# ./~/react-toolbox/lib/ripple/theme.css 4:14-100 13:2-17:4 14:20-106
# ./~/react-toolbox/lib/ripple/index.js
# ./~/react-toolbox/lib/button/index.js
# ./src/browser/home/HomePage.js
# ./src/browser/app/routeConfig.js
# ./src/browser/app/Root.js
# ./src/browser/main.js
# ./src/browser/index.js
# multi webpack-hot-middleware/client?path=http://192.168.1.41:8080/__webpack_hmr ./src/browser/index.js
Could anybody help me please?

Uncaught TypeError: Cannot read property 'currentUser' of undefined

app.js
service.js
When I run localhost in console I have error
bundle.js:7541 Uncaught TypeError: Cannot read property 'currentUser'
of undefined(anonymous function) # bundle.js:7541invoke #
bundle.js:12268(anonymous function) # bundle.js:12076forEach #
bundle.js:7880createInjector # bundle.js:12076doBootstrap #
bundle.js:9310bootstrap # bundle.js:9331angularInit #
bundle.js:9216(anonymous function) # bundle.js:39027j #
jquery.js:3047fireWith # jquery.js:3159ready # jquery.js:3365I #
jquery.js:3380
Please help (I think I forgot something)
Inside app.js you have $window.localStorage.currentUser.
$window.localStorage is undefined and so you get the error that can't find currentUser of undefined.
change to: if ($window.localStorage && $window.localStorage.currentUser)

I am getting few errors on angularjs app which I am not sure why it's coming?

Hi I was working on angular app after few changes I am getting an error which I am not sure why it's coming.
error : TypeError: a is not a function
at angular.min.js:70
at m.promise.then.u (angular.min.js:97)
at m.promise.then.u (angular.min.js:97)
at angular.min.js:98
at h.$get.h.$eval (angular.min.js:108)
at h.$get.h.$digest (angular.min.js:106)
at h.$get.h.$apply (angular.min.js:109)
at f (angular.min.js:71)
at F (angular.min.js:75)
at XMLHttpRequest.x.onreadystatechange (angular.min.js:76)(anonymous function) # angular.min.js:89$get # angular.min.js:66m.promise.then.u # angular.min.js:97m.promise.then.u # angular.min.js:97(anonymous function) # angular.min.js:98$get.h.$eval # angular.min.js:108$get.h.$digest # angular.min.js:106$get.h.$apply # angular.min.js:109f # angular.min.js:71F # angular.min.js:75x.onreadystatechange # angular.min.js:76XMLHttpRequest.send (async)b # angular.min.js:77z # angular.min.js:72$get.f # angular.min.js:70m.promise.then.u # angular.min.js:97m.promise.then.u # angular.min.js:97(anonymous function) # angular.min.js:98$get.h.$eval # angular.min.js:108$get.h.$digest # angular.min.js:106$get.h.$apply # angular.min.js:109(anonymous function) # angular.min.js:18d # angular.min.js:34c # angular.min.js:17$b # angular.min.js:18Wc # angular.min.js:17(anonymous function) # angular.min.js:209v.Callbacks.l # jquery.min.js:2v.Callbacks.c.fireWith # jquery.min.js:2v.extend.ready # jquery.min.js:2A # jquery.min.js:2
I am not sure why this is coming and I am getting such 15 errors. It is not breaking my app but I am seeing this on chrome console.
I have changed from min.js to .js got this error :
TypeError: fn is not a function at angular.js:7946
at wrappedCallback (angular.js:11319)
at wrappedCallback (angular.js:11319)
at angular.js:11405
at Scope.$eval (angular.js:12412)
at Scope.$digest (angular.js:12224)
at Scope.$apply (angular.js:12516)
at done (angular.js:8204)
at completeRequest (angular.js:8412)
at XMLHttpRequest.xhr.onreadystatechange (angular.js:8351)(anonymous function) # angular.js:9778
As you cant place code in plunker I can only guess.
Are you passing any parameter to callback function? Usually it happens when you pass something like
.success($scope.message = "Task completed")
to in-build angular functions. In above case when the Ajax call completes, it is being invoked as a function, thus causing the error. It should have been as
.success(function () {
$scope.message = "Task completed";
})
In your case you may be assigning "a" to some variable.

Resources