thunkable / thunkable-issues

24 stars 9 forks source link

Firebase get function does not run inside Firebase sign-in function on mobile browser view only #1068

Open 22rdhall opened 2 years ago

22rdhall commented 2 years ago

Platform

This issue runs correctly on a desktop browser and thunkable companion live view, but it does not work on a mobile device browser in mobile viewer mode. It does work in chrome on a mobile device if you request a desktop site.

This is on the ThunkableX platform. Not drag and drop.

Steps to Reproduce

  1. Have a firebase account for sign in and database function
  2. Create a button.
  3. Inside the button "on click" function put a realtime db get function inside of a firebase sign in function.

Expected Behavior

The get function should get data from the database.

Actual Behavior

The signin function works and gets a uid. However the get function does not run, and code inside of the get function does not execute.

Project Link

Project email and password are hardcoded in. All you have to do is hit the button. You don't need to fill in text inputs. Email: calcsol.services@gmail.com PW: aaaaaa

Community Link

[Community Link] (https://community.thunkable.com/t/major-web-app-crash-with-phone-issue/1629279/25)

Extra: If you are trying to see the issue on a computer if you hit hit F12 while in responsive web app view and click on the “toggle device toolbar” in the top left you can recreate fairly quick by choosing a mobile device. Code works on a normal browser but not on a phone. (using chrome)


  STACK TRACE AND/OR SCREENSHOTS
![thunk](https://user-images.githubusercontent.com/13912726/143068181-4df0d690-4531-4868-8cee-0aad461c5cfd.JPG)
This is an image from my original app. The star is where the code doesn't run. 

![screen-capture](https://user-images.githubusercontent.com/13912726/143068211-00e54bb1-4a2f-44c0-9818-8137b51572fd.gif)
In the gif the first time I run the code is in normal desktop mode and it works in my old app. Once I switch to mobile viewer it throws a code.
22rdhall commented 2 years ago

@weihuali0509, @josmas: I hate to push, because I know you guys are working hard and are busy (especially after the holidays).

This problem wasn't an issue when I first made my app on Thunkable, but suddenly it is now. The manufacturing company I am with is pushing me hard to get an answer so we know what route to take. They need a solution as it takes a large workload off employees.

Does this look like something that could be a quick fix on Thunkables end or should I look for an alternative solution for them?

Thank you!

jaredgibb commented 2 years ago

Hey @22rdhall,

I understand this has been outstanding for a bit. I think what you can do for now is add a 0 second or .01 second delay block. What appears to be happening (not that I'm an engineer) is that there needs to be a slight pause on iOS devices to attach the authentication to the following call.

One workaround for now will be to do the above mentioned solution. We will work to repair this but it may not take top priority for now. Please let me know if this workaround doesn't solve your issue. Screen Shot 2021-12-07 at 5 10 50 PM

Check out this sample project https://x.thunkable.com/projectPage/61afd5f3e5c3230639b65ff1

22rdhall commented 2 years ago

@jaredgibb

Thanks for your help. It is much appreciated. However the work around does not work. Your link is expired but mine is below.

test app

I don't think you work with Thunkable, but I am going to cancel Thunkable Pro. It is going to take some time to move over but I can do most everything through airtable.

It is very bad when customers and companies rely on this and then out of nowhere it bugs out. This is the second time I have gotten to the end of a project and a bug pops up and there is nothing I can do. I'm litterally wasting my money. (they still haven't fixed the first bug over a year old). I will be leaving a review on the app store too. Thunkable is good but not great yet.

I really appreciate you trying to help though.

jaredgibb commented 2 years ago

hey @22rdhall, I do work for Thunkable. If you'd like we can jump on a call sometime to sort this out. I have just tested this on end and it definitely works no issue. I'd love to work through this with you and figure out where the pain points are. :)

The following code works just fine for me on web preview and the live companion app. I haven't tested it on a downloaded app yet.

Screen Shot 2021-12-13 at 3 52 15 PM

s

22rdhall commented 2 years ago

@jaredgibb

Can we jump on a call together today or tomorrow? I can email you my contact info. It will be a short call just to make sure we are on the same page.

I agree that it does work as a responsive mobile app on a desktop. It does not work when you publish the app and then open it in a mobile browser such as Safari.

I can make myself available anytime today or tomorrow. Is jared.gibb@gmail.com a good email to send contact info too?

Thanks! Ryan H.

jaredgibb commented 2 years ago

More Context:

Hi. I have a bug that is affecting only one user.

When signing in via firebase, then getting data when viewing his app as a progressive web app on a phone or in phone preview mode on chrome he is getting fatal errors indicating that either the database URL can't be parsed or that the firebase auth object was empty.

It's quite strange. I think we found a workaround using cloud variables, but this has essentially put his app to a halt which puts that part of his company to a halt (not everything, just some daily task management)

So to reproduce: check your SLACK for signin details @thunkable team or send @jaredgibb a message.

it should log you in and provide an alert

then view it in developer mode and also with a mobile/responsive preview refresh the screen and login again. You'll be met by the following error.