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

Cannot follow Create New Team Path #110

Open
evanliewer opened this issue Sep 5, 2022 · 12 comments
Open

Cannot follow Create New Team Path #110

evanliewer opened this issue Sep 5, 2022 · 12 comments

Comments

@evanliewer
Copy link

Screen Shot 2022-09-05 at 4 12 02 PM

Screen Shot 2022-09-05 at 4 13 31 PM

Using the default create team link on the sidebar I get the following error. The current version error pops up sometimes when clicking dashboard or settings. But the nil error is constant on the create a new team link. I recently upgraded the API gem

@gazayas
Copy link
Contributor

gazayas commented Sep 7, 2022

@evanliewer Thanks for reporting, I'm having trouble reproducing the error on my side, but bullet_train-api and related packages are also being updated rapidly so that might be the cause. Can I ask which versions of the following packages you're running on?

bullet_train
bullet_train_api
bullet_train-base

@evanliewer
Copy link
Author

bullet_train 1.1.2
bullet_train_api 1.0.17
bullet_train-base (not listed in gem lock)

@evanliewer
Copy link
Author

Screen Shot 2022-09-07 at 4 21 13 PM

Don't know if this is connected, but every time I reset the server, I get this error when clicking dashboard. Then after refreshing it is resolved

@gazayas
Copy link
Contributor

gazayas commented Sep 8, 2022

@evanliewer I think you'll need to update bullet_train-api to v1.1.x.

The new API was implemented in bullet-train-co/bullet_train-api@16b53e7, and the commit right before it is v1.0.17 so the minor version needs to be updated. It includes current_version's attribute accessor in bullet_train-api/lib/bullet_train/api.rb:

module BulletTrain
  module Api
    mattr_accessor :endpoints, default: []
    mattr_accessor :current_version, default: "v1"
  end
end

I'm not sure yet about the first resolver error you mentioned, but let me know if updating the gem helps any!

Reproducing the error

I was able to reproduce the current_version error in the terminal when running bin/dev by the way running on the following versions

  1. bullet_train 1.1.2
  2. bullet_train-api 1.0.17
15:12:45 web.1              | /home/gazayas/work/bt/bullet_train/config/initializers/api.rb:1:in `<main>': undefined method `current_version=' for BulletTrain::Api:Module (NoMethodError)
15:12:45 web.1              | 
15:12:45 web.1              | BulletTrain::Api.current_version = "v1"
15:12:45 web.1              |                 ^^^^^^^^^^^^^^^^^^

@evanliewer
Copy link
Author

Screen Shot 2022-09-08 at 8 56 03 AM

I updated to bullet_train 1.1.4 and restarted the server and everything ran, but did not fix any of my errors. I then updated bullet_train-api 1.1.6 (was 1.0.17) and restarted the server and it will not start. attached is the error I get. Also attached is part of my gem.lock

Screen Shot 2022-09-08 at 8 59 16 AM

@evanliewer
Copy link
Author

Realized this is a larger issue with any logins. I am unable to login to the program at all now. After a computer reset I have no ability to see anything on local-host as I get this error. Also bin/dev is doing weird things. I need to run redis-server in a separate window in order for it to not crash

Screen Shot 2022-09-08 at 10 36 26 AM

@gazayas
Copy link
Contributor

gazayas commented Sep 8, 2022

@evanliewer As far as the first error, the JSON API serializers are compatible with the previous version of Bullet Train, but you can see here that we don't use JSON API and Grape anymore. We should probably update the docs for making the migration to the new API since there are most likely still some files leftover like those JSON API serializers in other developers projects as well.

About the resolver.path issue, if the API errors are gone and it's still showing up, it could be a problem with the monkey patch in our themes helper. I think we'd have to figure out the API compatibility issue first though, so I'll look into what needs to be done to migrate everything over successfully (using ActionContoller::API as opposed to Api::V1::Root in controllers, removing the serializers, etc.)

@evanliewer
Copy link
Author

Thanks for all your help with this. I currently don't use any functionality from JSON or API. I started with a fresh rewrite about a month ago with the new gem version of bullet train. I downgraded the API gem and I can boot up the server now (still have to boot redis separately) but I still get the resolver.path error on newest bullet_train and newest theme. Any chance there is a quick workaround, I cannot access any part of the program since the login is not working

Using bullet_train 1.1.4 (was 1.1.2)
Using bullet_train-themes-tailwind_css 1.0.15
Using bullet_train-api 1.0.17
Using bullet_train-super_scaffolding 1.0.36
Using bullet_train-themes-light 1.0.50 (was 1.0.49)

@gazayas
Copy link
Contributor

gazayas commented Sep 9, 2022

No problem, I'm glad to work through it with you!

I would revert to v1.0.99 for the bullet_train gem. The first thing I can think of is config/initializers/api.rb, which I would remove if you revert to 1.0.x. The attribute accessor I mentioned earlier is referring to the variable there.

If you still get some errors, 9bb706f is the commit where the bump to 1.1.0 was made and there were some breaking changes, but I would look over bullet-train-co/bullet_train@bf57d29 and see what might be causing issues since that commit relates directly to your local application.

Start from reverting to v1.0.99 and removing config/initializers/api.rb, and let me know how it goes! Sorry again for the trouble.

@evanliewer
Copy link
Author

I reverted to bullet train 1.0.99 and bullet_train-api to 1.0.17 and I still get the same error. I do not have an api.rb in my initializers.

@andrewculver
Copy link
Contributor

@juliancheal @evanliewer Let us know if you have an update after connecting.

@gazayas
Copy link
Contributor

gazayas commented Oct 6, 2022

I was considering closing this one, but we had one more developer have a similar error on SessionsController#new, so I'll keep this one open in case it pops up again.

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