Search code examples
javascriptmeteormeteor-blazemeteor-accountsmeteor-useraccounts

Login forbidden after upgrading Meteor version 2.2 to 2.4


Meteor version: 2.4 Node version: 14.x

After upgrading Meteor version 2.2 to 2.4 I face some issues. In the project, I used useraccounts:core and connected with that some other dependencies. After the upgrade my login design changed and when I try to log in it will show me the “Login forbidden” error. I am attaching the previous login design after upgrading the design.

PREVIOUS DESIGN:

enter image description here

CURRENT DESIGN:

enter image description here

Now if I use email rather than username it will be logged in but the home screen is blank. I am sure that logged in successfully because in local storage the desired details are stored.


Solution

  • I faced the same issue for 2.2 to 2.3, So I did the below steps to solve this issue. I tried 2 ways where 1st point is wrong.

    1. Remove the packages and then update:

    • I got multiple package errors while updating 2.2 to 2.3 because in 2.3 is major change happened. So I checked the conflicts packages and removed those package dependencies.
    • Then I pass the update command in my project:
    meteor update --release 2.3
    
    • It will update the version but is not able to start a project. So I add one by one removed dependencies and then try again. But not worth it.

    2. Understand the issue and Fork it(Best and easy way):

    • This is the perfect and clear way to solve this issue. I checked the errors and understood which package having an issue while updating. I checked the root package dependency and checked that particular package in the atmosphere.js.
    • Then I fork a package and remove the .git folder.
    • Then place that new folder inside of our projects repo and place it inside the package/ folder.
    • So now it will take that dependency from your local repository.
    • Now try the update command again:
    meteor update --release 2.3
    
    • If you see the same error then do the same process for another package.

    Using the 2nd step I can solve this issue very easily.