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

An error in "develop" branch #173

Closed
albertly opened this issue Aug 4, 2020 · 10 comments · Fixed by #194
Closed

An error in "develop" branch #173

albertly opened this issue Aug 4, 2020 · 10 comments · Fixed by #194

Comments

@albertly
Copy link

albertly commented Aug 4, 2020

I've packed "develop" branch with command "npm pack" to make tgz file.
(I need to make some changes in oidc-react)
When using oidc-react as packed tgz in the project "example-oidc-react" (npm install ../oidc-react/oidc-react-1.0.0-alpha.5.tgz)

I've got an error when running in a browser:

Uncaught TypeError: this._signinStart is not a function
    at Object.t [as signIn] (oidc-client.min.js:47)
    at onClick (LoggedIn.tsx:12)
    at HTMLUnknownElement.callCallback (react-dom.development.js:188)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:237)
    at invokeGuardedCallback (react-dom.development.js:292)
    at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:306)
    at executeDispatch (react-dom.development.js:389)
    at executeDispatchesInOrder (react-dom.development.js:414)
    at executeDispatchesAndRelease (react-dom.development.js:3278)
    at executeDispatchesAndReleaseTopLevel (react-dom.development.js:3287)
    at forEachAccumulated (react-dom.development.js:3259)
    at runEventsInBatch (react-dom.development.js:3304)
    at runExtractedPluginEventsInBatch (react-dom.development.js:3514)
    at handleTopLevel (react-dom.development.js:3558)
    at batchedEventUpdates$1 (react-dom.development.js:21871)
    at batchedEventUpdates (react-dom.development.js:795)
    at dispatchEventForLegacyPluginEventSystem (react-dom.development.js:3568)
    at attemptToDispatchEvent (react-dom.development.js:4267)
    at dispatchEvent (react-dom.development.js:4189)
    at unstable_runWithPriority (scheduler.development.js:653)
    at runWithPriority$1 (react-dom.development.js:11039)
    at discreteUpdates$1 (react-dom.development.js:21887)
    at discreteUpdates (react-dom.development.js:806)
    at dispatchDiscreteEvent (react-dom.development.js:4168)
t @ oidc-client.min.js:47
onClick @ LoggedIn.tsx:12
callCallback @ react-dom.development.js:188
invokeGuardedCallbackDev @ react-dom.development.js:237
invokeGuardedCallback @ react-dom.development.js:292
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:306
executeDispatch @ react-dom.development.js:389
executeDispatchesInOrder @ react-dom.development.js:414
executeDispatchesAndRelease @ react-dom.development.js:3278
executeDispatchesAndReleaseTopLevel @ react-dom.development.js:3287
forEachAccumulated @ react-dom.development.js:3259
runEventsInBatch @ react-dom.development.js:3304
runExtractedPluginEventsInBatch @ react-dom.development.js:3514
handleTopLevel @ react-dom.development.js:3558
batchedEventUpdates$1 @ react-dom.development.js:21871
batchedEventUpdates @ react-dom.development.js:795
dispatchEventForLegacyPluginEventSystem @ react-dom.development.js:3568
attemptToDispatchEvent @ react-dom.development.js:4267
dispatchEvent @ react-dom.development.js:4189
unstable_runWithPriority @ scheduler.development.js:653
runWithPriority$1 @ react-dom.development.js:11039
discreteUpdates$1 @ react-dom.development.js:21887
discreteUpdates @ react-dom.development.js:806
dispatchDiscreteEvent @ react-dom.development.js:4168
example-oidc-react:1 Unchecked runtime.lastError: The message port closed before a response was received.

When using npm package version 1.0.0-alpha.5 everything is Ok.

I've pulled version 1.0.0-alpha.5 (git checkout tags/v1.0.0-alpha.5 -b v1.0.0-alpha.5-branch)
Packed it tgz. Everything is Ok.

So, version 1.0.0-alpha.5 was Ok, "develop" branch is not Ok.

@simenandre
Copy link
Member

Hello!

Thanks for opening an issue. I haven't checked the error yet, but I wonder, what changes do you need?

@albertly
Copy link
Author

albertly commented Aug 4, 2020

@@ -59,6 +59,11 @@ export interface AuthProviderProps {
    */
   autoSignIn?: boolean;

+  /**
+   * defaults to { store: window.sessionStorage }
+   */
+  userStoreSettings?: WebStorageStateStoreSettings;
+
   /**
    * On before sign in hook. Can be use to store the current url for use after signing in.
    *

@simenandre
Copy link
Member

Hmm, this could be something we’d like to add as to the library. Maybe you’d like to push a PR?

@albertly
Copy link
Author

albertly commented Aug 6, 2020

Yes, I'll be happy to. However I've made my changes on 1.0.0-alpha.5 (as working version from npm).
However, I have no possibility to check my changes on the latest one, because as I said it seems to be with an error when using packed from another project.

When this issue be resolved, I'll make PR.

Best regards

@simenandre
Copy link
Member

Hello 👋

I was not able to reproduce the issue you're having.

Maybe you can create a repro repository?

@stocky37
Copy link

stocky37 commented Aug 21, 2020

I'm seeing this as well with manual signIn on 1.0.0. I'll see if I can make a simple repro.

@stocky37
Copy link

Reprod in https://github.com/stocky37/oidc-react-173-repro.

Clicking either of the login buttons will show the error, while setting autoSignIn to true will immediately work.

@simenandre
Copy link
Member

Thank you very much, @stocky37 !

simenandre added a commit that referenced this issue Aug 21, 2020
Fixes an issue where its not possible to use signIn function

fix #173
github-actions bot pushed a commit that referenced this issue Aug 21, 2020
## [1.0.1](v1.0.0...v1.0.1) (2020-08-21)

### Bug Fixes

* this._signinStart is not a function ([20b1e57](20b1e57)), closes [#173](#173)
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 1.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@stocky37
Copy link

Nice one @cobraz, works great! 👏

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

Successfully merging a pull request may close this issue.

3 participants