question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

onSuccess doesn't get called.

See original GitHub issue

Bug Report or Feature Request (mark with an x)

  • [x ] bug report -> please search issues before submitting
  • feature request

OS and Version?

Windows 10.

Versions

 _                      _                 ____ _     ___
/ \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|

/ △ \ | '_ \ / | | | | |/ _ | '__| | | | | | | / ___ | | | | (| | || | | (| | | | || | | | // __| ||_, |_,||_,|| _||| |___/

Angular CLI: 7.1.3 Node: 8.11.1 OS: win32 ia32 Angular: 7.1.3 … animations, cli, common, compiler, compiler-cli, core, forms … http, language-service, platform-browser … platform-browser-dynamic, platform-server, router

Package Version

@angular-devkit/architect 0.11.3 @angular-devkit/build-angular 0.11.3 @angular-devkit/build-optimizer 0.11.3 @angular-devkit/build-webpack 0.11.3 @angular-devkit/core 7.1.3 @angular-devkit/schematics 7.1.3 @angular/cdk 7.1.1 @angular/fire 5.1.1 @angular/flex-layout 7.0.0-beta.19 @angular/material 7.1.1 @ngtools/webpack 7.1.3 @schematics/angular 7.1.3 @schematics/update 0.11.3 rxjs 6.3.3 typescript 3.1.6 webpack 4.23.1

Repro steps

<ngx-auth-firebaseui *ngIf=“thisUser==null” [guestEnabled]=“false” (onSuccess)=“printUser($event)” (onError)=“printError($event)”> </ngx-auth-firebaseui> <ngx-auth-firebaseui-user *ngIf=“thisUser”></ngx-auth-firebaseui-user>

Desired functionality

I would like to see that the onSuccess gets called.

Mention any other details that might be useful

onSuccess doesn’t get called. On the above sample, onSuccess does nothing and onError will send the error object 2 more times to the console. So without the above onError call, error event will show TWICE and WITH the onError call it will show FOUR TIMES on each unsuccessful login attempt.

Please note: this is not the same issue as #138 ‘Progress bar doesn’t stop and onSuccess doesn’t work’, because in my case the progress-bar does stop. Also, the firebase User object gets updated after a successful login.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Avrohomcommented, Dec 13, 2018

Seems that after adding the toastMessageOnAuthSuccess: false or even true option solves this problem. Basically, one needs to specify the config parameter when initializing the component.

Now onSuccess gets indeed called.

Looks like the line if (this.config.toastMessageOnAuthSuccess) { inside src/module/services/auth-process.service.ts:211 is malfunctioning if the config parameter is not specified.

0reactions
sanjay-k7rcommented, May 31, 2019

Hi Anthony,

Sorry, I had to reopen this as I face the same issue with v2.7.2. OnSuccess not called. Tried the workaround above…but did not help either.

New ticket is #257

Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

onSuccess doesn't get called when query is retrieved ... - GitHub
However, I do find strange that the onSuccess callback is not getting called when the result is retrieved from cache. It's a bit...
Read more >
onSuccess not triggered when query has staleTime. react-query
onSuccess is only triggered when a request is send, but you can use a workaround like this: const EditProfileForm: React.
Read more >
onSuccess and onError callbacks in React Query - YouTube
Five Clever Hacks for React-Query and SWR · Power Apps Form OnSuccess, OnFailure, and OnReset · React · Become a Pro React Developer...
Read more >
SubmitForm not calling OnFailure or OnSuccess
Solved: Hi, I created a modified version of the expense app in PowerApps. Link to the demo app. With the owner of this...
Read more >
lightning:recordEditForm - reset method in onsuccess context ...
However, this does not work if called in "onsuccess" method. ... 1. Create a component on a page that shows recordEditForm with Save...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found