Alovoa / alovoa-expo

Alovoa frontend for Web, Android and iOS - Made with expo
https://play.google.com/store/apps/details?id=com.alovoa.expo
Mozilla Public License 2.0
49 stars 10 forks source link

[BUG] Attempted registration gives errors #55

Closed exceptionally-ordinary closed 4 months ago

exceptionally-ordinary commented 4 months ago

Check if you're in the correct repository

The bug appears on app.alovoa.com as well as in the Android app.

Describe the bug

Trying to create a new account in the Android app by clicking "sign up with email" gives the message "an error occurred. Please try again.".

After the registration didn't work I switched to the website so I can get some helpful debug logs. The POST https://beta.alovoa.com/register logs the following with error code 409:

POST
https://beta.alovoa.com/register
[HTTP/2 409  2124ms]

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

could not execute statement [(conn=17975) Field 'number_profile_views' doesn't have a default value] [insert into user (accent_color,admin,audio_id,confirmed,country,dates_id,delete_token_id,description,disabled,email,first_name,gender_id,intention_id,language,location_latitude,location_longitude,number_referred,number_searches,password,password_token_id,prefered_max_age,prefered_min_age,profile_picture_id,referrer_code,register_token_id,show_zodiac,total_donations,ui_design,units,user_settings_id,uuid,verification_code,verification_picture_id) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)]

Also note that I used app.alovoa.com and never specified anything about using beta APIs. Not sure if this is intended behavior.

Aside from that, there are several error logs before that (again, not sure if this is intended behavior):

To Reproduce

I used Firefox without any plugins.

Steps to reproduce the behavior:

  1. Clear cookies etc.
  2. Go to the app or website "https://app.alovoa.com"
  3. Click on 'Sign up with email'
  4. Fill all required fields, press register
  5. See error

Expected behavior

I expected to registration to work, either redirecting to the login screen or to the actual app.

Native Application:

Web application


Please let me know if you need more information or help.


Edit: Also tried it on Chromium 123.0.6312.86 and the POST request fails with the same message. Interestingly, the two other error logs changed:

I hope this helps (if even somehow related).

Nonononoki commented 4 months ago

The problem was an unused database column, which I deleted. Could you try again?

exceptionally-ordinary commented 4 months ago

Now it logs a new error:

JDBC exception executing SQL [select u1_0.id,u1_0.accent_color,u1_0.admin,u1_0.audio_id,u1_0.confirmed,u1_0.country,u1_0.dates_id,u1_0.delete_token_id,u1_0.description,u1_0.disabled,u1_0.email,u1_0.first_name,u1_0.gender_id,u1_0.intention_id,u1_0.language,u1_0.location_latitude,u1_0.location_longitude,u1_0.number_referred,u1_0.number_searches,u1_0.password,u1_0.password_token_id,u1_0.prefered_max_age,u1_0.prefered_min_age,u1_0.profile_picture_id,u1_0.referrer_code,u1_0.register_token_id,u1_0.show_zodiac,u1_0.total_donations,u1_0.ui_design,u1_0.units,u1_0.user_settings_id,u1_0.uuid,u1_0.verification_code,u1_0.verification_picture_id from user u1_0 where u1_0.email=?] [(conn=18656) Unknown column 'u1_0.accent_color' in 'field list'] [n/a]; SQL [n/a]

Nonononoki commented 4 months ago

Thanks for the report! Registration works now :)