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

Updating to 2.5.1 broke HttpInterceptor on my app #109

Closed
aleperfetti81 opened this issue Oct 4, 2021 · 9 comments
Closed

Updating to 2.5.1 broke HttpInterceptor on my app #109

aleperfetti81 opened this issue Oct 4, 2021 · 9 comments

Comments

@aleperfetti81
Copy link

Hi all,

tomorrow morning i've upgraded ngx-lightbox from 2.4.1 to 2.5.1 and my HttpInterceptor got broken.
The intercept method defined in it was not called for LazyLoaded modules. It seems there was another package intercepting http requests.

After doing some testing, I found that it was the ngx-lightbox update that caused this problem.
Bringing it back to the previous version solved the problem.

Has anyone else had this problem? If so, how can I fix it?

Thanks!

Following is my dev environment:

Angular CLI: 12.2.8
Node: 12.14.0
Package Manager: npm 6.13.4
OS: win32 x64

Angular: 12.2.8
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, language-service, material, material-moment-adapter
... platform-browser, platform-browser-dynamic, router**

Package Version

@angular-devkit/architect 0.1202.8
@angular-devkit/build-angular 12.2.8
@angular-devkit/core 12.2.8
@angular-devkit/schematics 12.2.8
@schematics/angular 12.2.8
rxjs 7.3.1
typescript 4.3.4

@themyth92
Copy link
Owner

Hmm probably related to the new package i added to the dependancy list called ngx-filesaver. Not sure how to fix these though, so troublesome with this.

@aleperfetti81
Copy link
Author

Hmm probably related to the new package i added to the dependancy list called ngx-filesaver. Not sure how to fix these though, so troublesome with this.

Hi themyth92,

from what i read, the problem is the import of HttpClientModule in your main module. You should avoid this.
HttpClientModule should be imported once, from the app importing your ngx-lightbox.

I think it has nothing to do with ngx-filesaver.

@themyth92
Copy link
Owner

Hmm i think u are right. I am not really sure why that module is there. Will remove it

@aleperfetti81
Copy link
Author

Very good.
Could you let me know when a new fixed version will be online? So i could give it a try and let you know.

Thanks

@Roman-Simik
Copy link

I spent almost 3 hours debugging this problem in app and then I found it by rollbacking in git history because I would never imagine that image-gallery library can break whole http , you don' do any testing or what?

@themyth92
Copy link
Owner

Hey @Roman-Simik , i am not your employee lol. This is open source, feel free to use something else !

@themyth92
Copy link
Owner

@aleperfetti81 Can u try to run again with 2.5.2. Just remove the http module from this lib. Tks. Sorry for the long time, very busy nowadays.

@aleperfetti81
Copy link
Author

aleperfetti81 commented Nov 26, 2021

@aleperfetti81 Can u try to run again with 2.5.2. Just remove the http module from this lib. Tks. Sorry for the long time, very busy nowadays.

@themyth92 i tried with 2.5.2 and it fixes the problem, thanks ;)

@themyth92
Copy link
Owner

Tks a lot @aleperfetti81

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

No branches or pull requests

3 participants