Hi there, I would like to report a bug in the Ligh...
# general
a
Hi there, I would like to report a bug in the Lightdash app. While going to the login page, the Continue button is disabled and in a loading state. This occurs in both the cloud and demo applications. I have attached a screenshot and steps to reproduce this bug below. Steps to Reproduce 1. Go to the Login page. 2. Observe the Continue button (it is disabled and in a loading state). Reason for the Issue The LoginLanding component contains a variable
disableControl
. This is set to
true
because the
loginOptionsLoading
variable is
true
. The
||
(OR) operator checks for any
true
value from left to right and returns
true
and
loginOptionsLoading
is returning it as
true
.
loginOptionsLoading
gets data from the
useFetchLoginOptions
hook.
useFetchLoginOptions
makes an API request to fetch
fetchLoginOptions
. Here
useFetchLoginOptions
parameter for email is
undefined
I added logs to check if an API request is made during the initial loading. However, I found that
fetchLoginOptions
does not make an API request when
email = undefined
is passed, but the
useQuery
hook still returns
isLoading = true
as a defult. To solve this issue, TanStack recommends using the enabled parameter and setting its value to false. So, I added enabled = !!email to set it to false if email is undefined, but it is still not working as expected. I also tried returning a default value when email is undefined, but it is still not working. Thank you
1
p
👋 Thanks for your message - someone from the Lightdash support team will get back to you asap. Feel free to add any additional context to the thread here in the meantime (screenshots, app version if you're self-hosting etc.).
o
Hi Ajit, thanks for the message and the troubleshooting steps you have been through. I've just tested this and don't have the same problem - could you check to see if it's still a problem. If so could you also share the URL and browser you are connecting through? Thanks!
a
Hi Oliver, Yesterday, this was an issue on localhost as well as on https://app.lightdash.cloud/login. But now it's working on https://app.lightdash.cloud/login but still having the issue on localhost. I am currently using the Google Chrome browser and tested on Firefox too having the same issue. Attached small video for reference.
o
Ok, thanks for that info - what version are you currently using on localhost right now?
I'm checking if there were any changes made that might have fixed the issue on the live app!
a
"version": "0.1554.0"
Just took a latest pull too. "version": "0.1555.0" and run again still the issue persists.
o
Hi Ajit - just an update, I am speaking with the team to see if we have any options for you! I haven't been able to reproduce this just yet. If you can provide any more info about how you are running the app locally, that might be useful.
a
Hi Oliver, I am running Lightdash through docker. Followed instruction at code-contribution page to setup. Just an update, I just reinstall the whole setup and now it working fine for me. Current version of my lightdash is "0.1558.0".
g
Hello Ajit, can you please share screenshots of your console and network tab from Devtools, to see if there are any failed/pending requests
a
Hi Giorgi, I didn't capture screenshots of the network and console. but I checked myself, No API was getting called which make this in pending request. While going through the code base I had same doubt that
/user/login-options
API is getting called because this useFetchLoginOptions hook was returning
isLoading: loginOptionsLoading
true which was making
disableControl
true and so forth I add
enabled
parameter in
useQuery
hook within
useFetchLoginOptions
but didn't work out. I had some vite issue too so had to clean up the whole project and reinstall and after that this issue got fixed on version 0.1558.0. I can still try to rollback to 0.1555.0 and will try to recreate this issue for you if you want.
I still had one screenshot where i found this issue was on the https://app.lightdash.cloud/login. I will still try to recreate at my side and will let you know.
g
Thanks @Ajit Mishra, I'll take a look and get back to you, please do let me know if you encounter any errors in the console/network devtools
a
Hi Giorgi, I rolled back to the previous commit but was unable to reproduce this. Will let you know if I encounter it again.
🙏 1