Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Intermittent routing freeze-ups to the auth enabled Dashboard route #805

Closed
JoshuaVSherman opened this issue Apr 19, 2017 · 20 comments
Closed
Assignees
Labels

Comments

@JoshuaVSherman
Copy link

I'm submitting a bug report

  • Aurelia Skeleton Version

skeleton-esnext-webpack

  • Framework Version:
    same as in this skeleton

Please tell us about your environment:

  • Operating System:
    Ubuntu 16.04 LTS

  • Node Version:
    7.9.0

  • NPM Version:
    4.2.0

Webpack same as in this skeleton

  • Browser:
    Chrome Version 57.0.2987.133 (64-bit)

  • Language:
    ESNext

Current behavior:
Intermittent freeze to the /dashboard route after login. I am using the Aurelia-Auth plugin
There was no issue before I upgraded to the latest version of this skeleton, and there is no way to debug this issue that I am aware of. Myself and another developer have tried everything we could think of for the past day, but were unsuccessful in resolving this bug. i am open to using a different plugin or front end package for auth if that is the only solution.

Expected/desired behavior:
After login, the user gets routed to the /dashboard successfully without any freeze-ups

link to repo:
https://github.com/WebJamApps/combined-front/tree/dev/src

@JoshuaVSherman
Copy link
Author

i'm not sure if I fixed it, but i'm not able to reproduce this issue at this time, so closing this

@JoshuaVSherman
Copy link
Author

This seems to only occur intermittently and when i'm running the app locally using the webpack development server, also I have push-state enabled in routing

@JoshuaVSherman
Copy link
Author

unable to reproduce at this time

@JoshuaVSherman
Copy link
Author

steps to reproduce:

  • clear browser history (chrome)
  • open console
  • npm start (starts webpack dev server)
  • login to google
  • post to google succeeds in backend, but Aurelia-Auth fails to process the response back from google,
    browser says Processing Request ...
    never stops processing

@jods4
Copy link

jods4 commented Apr 23, 2017

Is this the right place for this issue?

It seems related with aurelia-auth more than the skeletons.

@JoshuaVSherman
Copy link
Author

closing with this issue posted to aurelia-auth
paulvanbladel/aurelia-auth#178

@JoshuaVSherman
Copy link
Author

could this be an issue with using the aurelia-webpack-plugin
and how we needed to do this in the main.js
aurelia.use.plugin(PLATFORM.moduleName('aurelia-auth/auth-filter'));
aurelia.use.plugin(PLATFORM.moduleName('aurelia-auth'), (baseConfig)=>{
baseConfig.configure(config);
});

@jods4
Copy link

jods4 commented Apr 24, 2017

Any reason why it would?
That code ensures Webpack includes the required modules in the bundle and compiles to:

aurelia.use.plugin('aurelia-auth/auth-filter');
aurelia.use.plugin('aurelia-auth', baseConfig=>baseConfig.configure(config));

@JoshuaVSherman
Copy link
Author

JoshuaVSherman commented Apr 24, 2017 via email

@JoshuaVSherman
Copy link
Author

This just happened from production, so it is not the webpack dev server
https://www.web-jam.com/dashboard

please provide any recommendations

@jods4
Copy link

jods4 commented Apr 25, 2017

My recommandation is to look for support with aurelia-auth.
aurelia-auth is not even in the skeleton so I don't think you'll get much help here.

@JoshuaVSherman
Copy link
Author

JoshuaVSherman commented Apr 25, 2017 via email

@JoshuaVSherman
Copy link
Author

could this be the reason?
SpoonX/aurelia-authentication#347

I know this is not the same plugin i'm using, but it seems similarly an issue

@JoshuaVSherman
Copy link
Author

This might have been a good thing to mention up front in your readme file for the differences between the old and new skeleton webpack esnext
https://github.com/aurelia/webpack-plugin/wiki/Managing-dependencies

@jods4
Copy link

jods4 commented Apr 25, 2017

How is that issue even remotely related?

You say that you have intermittent freezes with aurelia-auth.

That issue is about a consistent crash for a missing module with message:
Unable to find module with ID: aurelia-authentication/authFilterValueConverter
when using aurelia-authentication...

@JoshuaVSherman
Copy link
Author

read on down, the proposed solution was to use the

plugins: [
new AureliaPlugin(),
new ModuleDependenciesPlugin({
'aurelia-auth': ['./auth-filter'],
'aurelia-polymer': ['./au-select-custom-attribute'],
'au-table': ['./au-table', './au-table-select', './au-table-sort']
}),

so far I have not been able to reproduce the freezeup. This was my main.js before:

//aurelia.use.plugin(PLATFORM.moduleName('aurelia-auth/auth-filter'));
aurelia.use.plugin(PLATFORM.moduleName('aurelia-auth'), (baseConfig)=>{
baseConfig.configure(config);
});

@JoshuaVSherman
Copy link
Author

in the old skeleton, we didn't use this PLATFORM.moduleName thing so that seems to be a difference here

@jods4
Copy link

jods4 commented Apr 25, 2017

Please, this is not a support forum.

Issues in this repository are meant to report bugs in the skeletons, or suggest improvements (to the skeletons).

If you need help with integrating a library, Gitter or StackOverflows are better venues.

If you encounter bugs with 3rd party libraries like aurelia-auth not responding, their issue tracker is where you should report them.

You seem to be fishing in the dark here and I really can't help you with that.
As I told you before, using ModuleDependencingPlugin or PLATFORM.moduleName ends up in exactly the same result.
If you don't reproduce the issue it's most likely because it's sporadic. It's not the first time you say that you can't reproduce it... until it eventually happens again.

I won't read down that other issue because I know exactly what it is (trust me, I wrote the Webpack plugin) and it has absolutely nothing in common with yours (based on your description).

The way you describe your issue looks like a bug in aurelia-auth.
Webpack generates a deterministic bundle with synchronously resolved dependencies. It works or it does not.
aurelia-webpack-plugin doesn't do much more than registering dynamic dependencies in Webpack.
If your library has a race condition somewhere we won't be able to fix it here.

@JoshuaVSherman
Copy link
Author

I understand, I won't bother you again

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants