CLOSER-Cohorts / archivist

Archivist is designed to be an easy to use editor that allows documention of questionnaires and data in DDI-Lifecycle
MIT License
17 stars 8 forks source link

stuck at welcome screen after deploying to heroku #416

Open OlafHaag opened 4 years ago

OlafHaag commented 4 years ago

Hi there! I hit the Deploy to Heroku button and let it install on a free dyno. When I open the app I'm presented with a welcome screen and a form to setup a superadmin. But when clicking submit the page only refreshes.

I also tried with a different browser.

In the webbrowser developer console I could find amongst other warnings:

Source-Map-Error: Error: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Ressourcen-Adresse: https://ohaag-archivist.herokuapp.com/assets/application-<somecrypticstring>.js

The stuff in angle brackets I left out.

Other than that when pressing submit the application log prints (again omitting values in angle brackets):

source=rack-timeout id=<...> wait=7ms timeout=25000ms state=ready

source=rack-timeout id=<...> wait=7ms timeout=25000ms service=1ms state=active

Started GET "/stats.json" for <0.0.0.0> at 2020-04-29 01:22:45 +0000

Processing by MainController#stats as JSON

[1m[35m (1.2ms)[0m  [1m[34mSELECT COUNT(*) FROM "instruments"[0m

[1m[35m (1.5ms)[0m  [1m[34mSELECT COUNT(*) FROM "cc_questions"[0m

[1m[35m (1.0ms)[0m  [1m[34mSELECT COUNT(*) FROM "variables"[0m

[1m[35m (1.0ms)[0m  [1m[34mSELECT COUNT(*) FROM "users"[0m

Completed 200 OK in 17ms (Views: 0.2ms | ActiveRecord: 4.6ms)

source=rack-timeout id=<...> wait=7ms timeout=25000ms service=23ms state=completed

cache: [GET /stats.json] miss

cache: [GET /stats.json] miss

Can I provide more information?

spuddybike commented 4 years ago

Sorry about that, there is a work around.

on the Heroku CLI heroku login [enter credentials] heroku run rails db:seed --app=[appname] this sets up a default editor1@email.com and password 'Password123' fire up the app again and you should be in

spuddybike commented 4 years ago

and /admin gets you to administration to set things up

OlafHaag commented 4 years ago

Thanks for the guide. The rails db:seed command also works in the heroku web-interface.

If you'd be so kind. I'm still lost at how to add my own e-mail address and password. In the admin panel I can't change the e-mail addresses of the users. When I try to add a new user I get an alert Could not save user. [EDIT: A User is nonetheless added with status unconfirmed. I don't know the password for the newly created user, Reset Password doesn't seem to do anything. I get no e-mail or whatever I would have to expect.]

I can't sign-up, I just get an empty alert box in the top with a HTTP500 error in the browser's console pointing to /users.json and an unexpected error.

The heroku console output (changed e-mail and numbers):

Started POST "/users.json" for <0.0.0.0> at 2020-04-30 13:08:49 +0000

Processing by Users::RegistrationsController#create as JSON

 Parameters: {"user"=>{"email"=>"user1@theirdomain.com", "first_name"=>"User", "last_name"=>"1", "group_id"=>1, "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "registration"=>{"user"=>{"email"=>"user1@theirdomain.com", "first_name"=>"User", "last_name"=>"1", "group_id"=>1, "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}}}

 [1m[35m (0.8ms)[0m  [1m[35mBEGIN[0m

 [1m[36mUser Exists (1.0ms)[0m  [1m[34mSELECT  1 AS one FROM "users" WHERE "users"."email" = $1 LIMIT $2[0m  [["email", "user1@theirdomain.com"], ["LIMIT", 1]]

 [1m[35m (0.7ms)[0m  [1m[31mROLLBACK[0m

Completed 500 Internal Server Error in 94ms (ActiveRecord: 2.6ms)

NameError (uninitialized constant Users::RegistrationsController::Group):

app/controllers/users/registrations_controller.rb:14:in `block in create'

app/controllers/users/registrations_controller.rb:13:in `create'

source=rack-timeout id=<some id> wait=2ms timeout=25000ms service=98ms state=completed

cache: [POST /users.json] invalidate, pass

cache: [POST /users.json] invalidate, pass

at=info method=POST path="/users.json" host=o1-archivist.herokuapp.com request_id=<some id> fwd="<0.0.0.0>" dyno=web.1 connect=0ms service=103ms status=500 bytes=456 protocol=https
OlafHaag commented 4 years ago

The Reset Password issue seems to be connected to #106 .

spuddybike commented 4 years ago

Yes, you are correct, these will be addressed when we have some resources to allocate, at the moment this is not possible.

HayleyMills commented 3 months ago

@spuddybike can this be closed?