Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating existing app causes "Database does not exist" after being published #4093

Closed
funkymule opened this issue Jan 18, 2022 · 17 comments
Closed
Labels
bug Something isn't working

Comments

@funkymule
Copy link

Describe the bug
When I updated existing apps to the 1.0.43 version, then publish the app, it displays
{"message":"Database does not exist.","status":404}
upon opening.

To Reproduce
Steps to reproduce the behavior:

  1. Open an app created in an older version (mine was 1.0.25).
  2. Click the App Version button in the upper right corner (looks like a refresh button...is quite confusing to users).
  3. Accept the update to 1.0.43.
  4. (Re)publish the application.
  5. Go back to Budibase home screen.
  6. Click View published app on the newly updated app
  7. A white screen displays {"message":"Database does not exist.","status":404}

Expected behavior
The newly published app opens

Screenshots
image

@funkymule funkymule added the bug Something isn't working label Jan 18, 2022
@mike12345567
Copy link
Collaborator

Hi @funkymule - I gave this a go myself, setup a Budibase environment running v1.0.25, created an app, added some screens, published it - then updated the environment to v1.0.43 then upgraded the app and re-published it, when I viewed the app it was still functioning correctly.

Could you let me know a few things -

  1. We changed the way apps are accessed in the latest versions Budibase, it now accesses them via /app/<app_name> as the URL - I'm wondering if something went wrong with this making the app inaccessible - could you share the resource component of the URL?
  2. How did you perform the update, did you do it through the command line, or did you use the update section of Budibase to update via Watchtower?
  3. Just wondering if theres any console errors, or which network request is specifically failing, might help diagnose.

@funkymule
Copy link
Author

Actually, this error occurs for several published apps that were not upgraded or republished. :(
Every app that has a Data Source defined gives the same error.

@funkymule
Copy link
Author

The URL is /app/App%20Name

@sergey-dme
Copy link

sergey-dme commented Jan 18, 2022

I faced with the same problem after update to v1.0.42 yesterday. For update I use CLI.
Unpublish-App Rename-Publish-Unpublish-App Rename back-Publish helped in my case.

@mike12345567
Copy link
Collaborator

Hi @funkymule - what type of datasource is it that seems to be linked to the issue? Or is it just any datasource existing seems to cause it?

@funkymule
Copy link
Author

We only use SQL Server data sources, so I can't tell you if it's due to a SQL Server data source, or just because it has a data source in general.

And...to make it more confusing...of all the applications with SQL Server data sources...ONE of them is working. :o

@funkymule
Copy link
Author

I faced with the same problem after update to v1.0.42 yesterday. For update I use CLI. Unpublish-Publish-Unpublish-Publish (two times) and docker restart helped in my case.

I'll give it a shot!!!

@mike12345567
Copy link
Collaborator

Hi @funkymule - found the issue - I think its to do with apps that have uppercase letters in the app name - these will generate invalid URLs. if you try /app%20name instead of /App%20Name I believe it should work.

For now if you unpublish the broken apps and rename the apps to all lowercase it'll fix the link they generate, although I'll have an actual fix out for it soon.

mike12345567 added a commit that referenced this issue Jan 18, 2022
…yed apps is always lowercase, as URLs are not case sensitive and should not be compared as such.
@funkymule
Copy link
Author

Hi @funkymule - found the issue - I think its to do with apps that have uppercase letters in the app name - these will generate invalid URLs. if you try /app%20name instead of /App%20Name I believe it should work.

For now if you unpublish the broken apps and rename the apps to all lowercase it'll fix the link they generate, although I'll have an actual fix out for it soon.

@mike12345567 , I'll give it a look-see.
What I can say is that the application with the URL app/Waste%20Input loads properly, even though there are uppercase letters in the URL.

@funkymule
Copy link
Author

So if I change the URL to lowercase on the browser's address bar, you think it should work? I've tried changing the casing to all lowercase manually, and it doesn't change the behavior.

@mike12345567
Copy link
Collaborator

Sorry just realised, you'll need to change the app name itself, as the issue is server-side, if you unpublish the app, you'll be able to edit it, in which you can change the name, if you change it to all lower case it should then work!

@funkymule
Copy link
Author

Well...not a great solution but this works:

  • Unpublish the application My App
  • Rename the application My App to My App2
  • Refresh the page (Budibase thinks the original name is still taken if you don't refresh the page)
  • Rename the application from My App2 to My App
  • Publish My App

It works, but it's undesirable as the apps have unfinished, unpublished and untested changes that now must be published. And since there's no way to see what's changed since last publish, I can't undo pending changes. :(

But...it's better than apps not loading.

@mike12345567
Copy link
Collaborator

Yes sorry about the issue, we'll be pushing a fix for this soon, from the PR #4095 - once it's released you won't need to do that anymore!

@mike12345567
Copy link
Collaborator

mike12345567 commented Jan 19, 2022

Hi @funkymule - just to let you know v1.0.44 has been released, this should resolve the issue for you - going to close this for now, if it continues after update you can let me know and we can re-open to continue research.

@funkymule
Copy link
Author

Hi @funkymule - just to let you know v1.0.44 has been released, this should resolve the issue for you - going to close this for now, if it continues after update you can let me know and we can re-open to continue research.

Thanks for the quick attention to this!

shogunpurple pushed a commit that referenced this issue Feb 11, 2022
…yed apps is always lowercase, as URLs are not case sensitive and should not be compared as such.
@stellarfinn
Copy link

stellarfinn commented Feb 16, 2022

I'm having the same issue exact issue today. Public page, public database. Budibase cloud though.

Note, I'm trying to view it as an unauthenticated user on a separate browser.

Any ideas?

@Rory-Powell
Copy link
Contributor

@stellarfinn if you email the link to the app to rory@budibase.com I will investigate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants