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

Branded app internal server error with messaging #475

Open
ajburls opened this issue Oct 14, 2018 · 9 comments
Open

Branded app internal server error with messaging #475

ajburls opened this issue Oct 14, 2018 · 9 comments

Comments

@ajburls
Copy link
Collaborator

ajburls commented Oct 14, 2018

I created a client administrator and badged app for a hospital in Mexico www.BestEvidence.Info/HPS

He wrote to me to say

"When I click Messages there's an error: internal server error".

I have asked him for more details of what he was doing as the screenshot he sent (attached) didn't have the slug in it
screenshot from giordano

I await to hear back from him, but whatever it was it shouldn't have happened.

@ajburls ajburls added the bug label Oct 14, 2018
@iteles
Copy link
Member

iteles commented Oct 15, 2018

Agreed, it’s odd he would have arrived at this page!

@ajburls
Copy link
Collaborator Author

ajburls commented Oct 16, 2018

@iteles He appears to have done everything correctly and is using a unique email address for his client admin emails. He helpfully sent the attached files. In the video the URL loses the slug when he goes to messages but the app itself still says it is the Hospital Pediatra Sinoa version.

image001

The MP4 video file he made won't attach here so I have sent it to you by email

@iteles iteles changed the title Internal server error on app in production Branded app internal server error with messaging Oct 31, 2018
@iteles iteles added this to the Sprint 11 - Bug fixes milestone Oct 31, 2018
@RobStallion RobStallion self-assigned this Nov 6, 2018
@RobStallion
Copy link
Member

@ajburls. Thanks for sending over the video. That is very helpful.

With regards to the point about the URL losing the slug. This is the correct behaviour of the site. Once a user has logged in, the branding information is taken from the user data, not the url.

Still looking into what is causing the internal server error.

@iteles
Copy link
Member

iteles commented Nov 6, 2018

@RobStallion Sounds like we could also do with a little update in the docs for branded apps and how they work for future reference 😊

@RobStallion
Copy link
Member

I have created a new user for the hps account...

image

If I log in I get the hps branded version of the app as expected...

image

When I go to the messages page however I do not get an error. The site works as expected...

image

This leads me to believe that the error is to do with the particular user.

Next step is to look into what could cause an individual user to have an error.

@RobStallion
Copy link
Member

Still not sure what is causing this user to error but after looking into this a little more is doesn't appear that this user is an admin.

When an admin clicks on the messages button in the nav-bar they should be taken to the /list-users endpoint...

image

I am going to make a clone of the database and work with it locally to see if I can spot anything relating to this particular user that could be causing them to have an error.

@RobStallion
Copy link
Member

I have just managed to recreate the error locally

image

Looking into what is causing the issue now

@RobStallion
Copy link
Member

The error is being caused because the struct being passed in is nil this users case.

Looking into where this is being called to see why the value is nil.

@RobStallion
Copy link
Member

Found the cause of the bug. This particular user did not have a field in the user_messages_read table that related to them.

Looked into how this may have happened with @Danwhy but cannot see any reason for how this could have happened other than a database error.

Next steps

  • Create the field in the the user_messages_read table for users if they do not have already have one
  • Ensure that the field is always created when a user is

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

No branches or pull requests

3 participants