Error Logging In Using Phone Number As Identity

I got the following error when using UserService.login after changing my users table identify column to use the phone number as the identity column rather than the email column. The issue is solved for me, but I thought someone might be interested in the error. The cause was that I had renamed the “phoneNumber” column in the user table to “phone”. Apparently, it is hard-coded somewhere.

Backendless encountered an error while handling the request. An internal trouble ticket with ID 5DD80A71-4FC3-D0AB-FF2C-4EDC455D7F00 has been created and we will be investigating the issue.
class java.lang.Long cannot be cast to class java.lang.String (java.lang.Long and java.lang.String are in module java.base of loader ‘bootstrap’)
java.lang.ClassCastException: class java.lang.Long cannot be cast to class java.lang.String (java.lang.Long and java.lang.String are in module java.base of loader ‘bootstrap’)
at controllers.Users.lambda$login$11(Users.java:292)
at com.backendless.async.ExecutorService.lambda$submit$0(ExecutorService.java:64)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)

Hello @Kelly_Oglesby,

Thanks for reporting this issue.
Unfortunately we couldn’t reproduce it.
Could you please provide your APP ID and the step by step description to reproduce this problem?

Regards,
Olha

Hi Olha,

My app id is 43953016-3AB4-478E-A6C9-91937A61F288. I simply changed the identity column of my Users table in the console from the email column to the phone number column. When I used the UserServices.login method in the Javascript SDK from my client, passing a phone number and password, I got the reported error. I had renamed the phoneNumber column to “phone” a long time ago. As soon as I changed it back to “phoneNumber”, the error went away, and the call now works perfectly, like everything else in Backendless. :>) So I am a very happy customer - no further effort is required or expected on my end! I only reported in case someone was actively working an automatic trouble ticket, as was mentioned in the error message.

Kelly

Hi, @Kelly_Oglesby

We have checked your case one more time using UserServices.login method in the Javascript SDK. And we were unable to reproduce your issue. We are glad that you have found a solution to this situation and that the issue has been solved. Thank you for reporting this case, we will keep an eye on it.

Regards,
Marina