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] Swiping throws error / makes app buggy / doesn't actually swipe #57

Closed exceptionally-ordinary closed 4 months ago

exceptionally-ordinary commented 4 months ago

Describe the bug

Swiping worked for a few profiles and now it doesn't work anymore. Clicking a profile or swiping either way makes the swiping buggy (e.g. hang mid-swipe) and logs several errors. After reloading, the previous profiles show up again - unswiped.

Logs

Clicking on a profile:

GET https://beta.alovoa.com/api/v1/resource/profile/view/undefined

Log ``` { "message": "Request failed with status code 400", "name": "AxiosError", "code": "ERR_BAD_REQUEST", "config": { "transitional": { "silentJSONParsing": true, "forcedJSONParsing": true, "clarifyTimeoutError": false }, "transformRequest": [ null ], "transformResponse": [ null ], "timeout": 0, "xsrfCookieName": "XSRF-TOKEN", "xsrfHeaderName": "X-XSRF-TOKEN", "maxContentLength": -1, "maxBodyLength": -1, "env": { "FormData": null }, "headers": { "Accept": "application/json, text/plain, */*" }, "withCredentials": true, "method": "get", "url": "https://beta.alovoa.com/api/v1/resource/profile/view/undefined" }, "request": {}, "response": { "data": { "type": "about:blank", "title": "Bad Request", "status": 400, "detail": "Failed to convert 'uuid' with value: 'undefined'", "instance": "/api/v1/resource/profile/view/undefined" }, "status": 400, "statusText": "", "headers": { "cache-control": "no-cache, no-store, max-age=0, must-revalidate", "content-type": "application/problem+json", "expires": "0", "pragma": "no-cache" }, "config": { "transitional": { "silentJSONParsing": true, "forcedJSONParsing": true, "clarifyTimeoutError": false }, "transformRequest": [ null ], "transformResponse": [ null ], "timeout": 0, "xsrfCookieName": "XSRF-TOKEN", "xsrfHeaderName": "X-XSRF-TOKEN", "maxContentLength": -1, "maxBodyLength": -1, "env": { "FormData": null }, "headers": { "Accept": "application/json, text/plain, */*" }, "withCredentials": true, "method": "get", "url": "https://beta.alovoa.com/api/v1/resource/profile/view/undefined" }, "request": {} } } ```

Swiping right: POST https://beta.alovoa.com/user/like/undefined

Log ``` { "message": "Request failed with status code 400", "name": "AxiosError", "code": "ERR_BAD_REQUEST", "config": { "transitional": { "silentJSONParsing": true, "forcedJSONParsing": true, "clarifyTimeoutError": false }, "transformRequest": [ null ], "transformResponse": [ null ], "timeout": 0, "xsrfCookieName": "XSRF-TOKEN", "xsrfHeaderName": "X-XSRF-TOKEN", "maxContentLength": -1, "maxBodyLength": -1, "env": { "FormData": null }, "headers": { "Accept": "application/json, text/plain, */*" }, "withCredentials": true, "method": "post", "url": "https://beta.alovoa.com/user/like/undefined" }, "request": {}, "response": { "data": { "type": "about:blank", "title": "Bad Request", "status": 400, "detail": "Failed to convert 'uuid' with value: 'undefined'", "instance": "/user/like/undefined" }, "status": 400, "statusText": "", "headers": { "cache-control": "no-cache, no-store, max-age=0, must-revalidate", "content-type": "application/problem+json", "expires": "0", "pragma": "no-cache" }, "config": { "transitional": { "silentJSONParsing": true, "forcedJSONParsing": true, "clarifyTimeoutError": false }, "transformRequest": [ null ], "transformResponse": [ null ], "timeout": 0, "xsrfCookieName": "XSRF-TOKEN", "xsrfHeaderName": "X-XSRF-TOKEN", "maxContentLength": -1, "maxBodyLength": -1, "env": { "FormData": null }, "headers": { "Accept": "application/json, text/plain, */*" }, "withCredentials": true, "method": "post", "url": "https://beta.alovoa.com/user/like/undefined" }, "request": {} } } ```

Swiping left: POST https://beta.alovoa.com/user/hide/undefined

Log ``` { "message": "Request failed with status code 400", "name": "AxiosError", "code": "ERR_BAD_REQUEST", "config": { "transitional": { "silentJSONParsing": true, "forcedJSONParsing": true, "clarifyTimeoutError": false }, "transformRequest": [ null ], "transformResponse": [ null ], "timeout": 0, "xsrfCookieName": "XSRF-TOKEN", "xsrfHeaderName": "X-XSRF-TOKEN", "maxContentLength": -1, "maxBodyLength": -1, "env": { "FormData": null }, "headers": { "Accept": "application/json, text/plain, */*" }, "withCredentials": true, "method": "post", "url": "https://beta.alovoa.com/user/hide/undefined" }, "request": {}, "response": { "data": { "type": "about:blank", "title": "Bad Request", "status": 400, "detail": "Failed to convert 'uuid' with value: 'undefined'", "instance": "/user/hide/undefined" }, "status": 400, "statusText": "", "headers": { "cache-control": "no-cache, no-store, max-age=0, must-revalidate", "content-type": "application/problem+json", "expires": "0", "pragma": "no-cache" }, "config": { "transitional": { "silentJSONParsing": true, "forcedJSONParsing": true, "clarifyTimeoutError": false }, "transformRequest": [ null ], "transformResponse": [ null ], "timeout": 0, "xsrfCookieName": "XSRF-TOKEN", "xsrfHeaderName": "X-XSRF-TOKEN", "maxContentLength": -1, "maxBodyLength": -1, "env": { "FormData": null }, "headers": { "Accept": "application/json, text/plain, */*" }, "withCredentials": true, "method": "post", "url": "https://beta.alovoa.com/user/hide/undefined" }, "request": {} } } ```

Reproduction

Unfortunately I can't really explain much more. I tried with several profiles by varying the filters. Can't swipe at all.

Reproducible in the Android App as well as the website.

Nonononoki commented 4 months ago

F-droid build is currently broken until v1.9.2 gets build (which should be soon) because I accidentally used the beta site as reference.

Nonononoki commented 4 months ago

Web version is now fixed. Closing issue as is has been resolved in v1.9.2. Also, the bug template is there for a reason. This time I knew immediately what the issue was, but may not be the case for future tickets.

exceptionally-ordinary commented 4 months ago

Thanks for your great work. Sorry for messing up the template, I assumed it would be enough information. Web version is still not working. Maybe it takes some time?

Nonononoki commented 4 months ago

Thanks for your great work. Sorry for messing up the template, I assumed it would be enough information. Web version is still not working. Maybe it takes some time?

Should be live now, maybe clear cookies ?

exceptionally-ordinary commented 4 months ago

I already cleared cookies. I still get the exact same error.

Nonononoki commented 4 months ago

Are you on the regular or beta site?

exceptionally-ordinary commented 4 months ago

Ah I did not realize there was a beta app. It seems to work on the beta subdomain. Although I got this error a few times:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://beta.alovoa.com/user/status/new-alert/en. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 421.
Nonononoki commented 4 months ago

CORS header ‘Access-Control-Allow-Origin’ missing

Hi, feel free to create a new ticket for this error (in right repo) :)