Skip to content

Conversation

kushthedude
Copy link
Member

@kushthedude kushthedude commented Jan 10, 2020

Fixes #3677
Fixes #2396

@kushthedude
Copy link
Member Author

@iamareebjamal Tested on local, with production environment too (Fastboot_Disabled=false) .

@iamareebjamal
Copy link
Member

Will test today

@kushthedude kushthedude requested review from iamareebjamal and removed request for iamareebjamal and uds5501 January 13, 2020 20:51
@kushthedude
Copy link
Member Author

@iamareebjamal Merge?

@kushthedude
Copy link
Member Author

@iamareebjamal Please have a look, Fixes the transition to previous route too!

@iamareebjamal
Copy link
Member

node scripts/fastboot-server.js

@kushthedude
Copy link
Member Author

Both redirection and login is working well with fastboot enabled

this.set('session.previousRouteName', null);
}

return this._loadCurrentUser();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why call this here?

@iamareebjamal
Copy link
Member

iamareebjamal commented Jan 15, 2020

On event CFS page, went to login page, logged in and got Oops, the page you were trying to access has caused an error. .

@iamareebjamal
Copy link
Member

Also, there was a bug that sometimes the transition happens before user is loaded, so the site crashes. Test for that in fastboot mode as well

This is still happening as reported above

@kushthedude
Copy link
Member Author

kushthedude commented Jan 15, 2020 via email

@iamareebjamal
Copy link
Member

iamareebjamal commented Jan 15, 2020

That's not the solution. Solution should be generic. User should be loaded before transitioning

@kushthedude
Copy link
Member Author

@iamareebjamal Please try it again, fixes the transition crashes.

}
} finally {
this.set('isLoading', false);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the solution

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should be the approach then?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't even fix the issue I mentioned. So the approach should be whatever which doesn't at least break the existing app

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrapping await calls inside try-catch which, if fail were crashing fastboot app server ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that did not fix the issue, this is called ignoring the issue, not fixing it. Besides, it is still crashing

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nobody asked you to go to eventyay. Change API_HOST to https://api.eventyay.com and retest

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iamareebjamal Working on fastboot, Also checked on fossasia summit 2020. There was an issue in loading currentUser which was resulting into null query. Took reference from your WIP PR. It is working well now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be reverted

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The try catch block ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@niranjan94
Copy link
Member

Codacy Here is an overview of what got changed by this pull request:

Complexity increasing per file
==============================
- app/services/current-user.js  2
         

See the complete overview on Codacy

Copy link
Member

@iamareebjamal iamareebjamal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work

@iamareebjamal iamareebjamal merged commit 27f3a31 into fossasia:development Jan 18, 2020
@kushthedude kushthedude deleted the user branch January 19, 2020 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change user loading method Redirect page after the login/signup on Call for speakers

3 participants