Page is not loading properly - closed

9/11/18:
Thanks to all who helped me on this. Faye, Mishav and Marc have been very helpful.

I am “closing” this topic and removing the sample app. The problems I encountered have not been resolved, but I have learned enough from this discussion to pull back and take an entirely different approach to the page that has given me so much trouble.

9/10/18:
Because this problem is not going away and is terribly slippery, I’m updating the topic with current info in this opening post.

There are currently three distinct problems. One happens consistently. The other two come and go. They are not necessarily repeatable.

At this point, the solution @mguerrasio applied isn’t a complete solution. Today, the action-detail page fails to run the Page is loaded workflow on some Actions selected from the list (index page.) I cannot identify the conditions under which the workflow does not run. It is unpredictable.

When the Page is loaded workflow runs, one of its last actions is to Set state isDirty of action-detail to “no”.
image
The state isDirty controls the conditional dimming of several buttons to signify that they shouldn’t be used.


(note: for testing, the buttons are dimmed but not disabled.)
There is no reason for the buttons to be dimmed on a freshly loaded page since isDirty would be set to “no” in the Page is loaded workflow.

  1. In all circumstances, even when the page loads correctly, it takes far longer than I would expect. In the best of circumstances, it is about five seconds to load. I realize there is a lot going on with the page, but I don’t understand what is taking so long. As far as I know, Bubble doesn’t provide tools for diagnosing timing issues.

Original post on 9/7/18:

I’ve experienced a myriad of problems with this app for more than a month. I need help figuring out what is going wrong.

For most of this year, a rudimentary version of the app has been working just fine. I’ve made minor enhancements periodically, and things have worked pretty much as expected. In early August, I undertook a major enhancement, implementation of one-to-many relationship between Project and Action. Previously, I had been using Project Name in Action records to identify the Project each Action belonged to.

I’ll explain more about this later in the message.

Today’s problem seems to happen consistently and is preventing me from getting back to diagnosing other problems that cropped up as I worked to make the new referential integrity work and to diagnose various problems.

Here’s a picture of what the page looks like after loading. It is incomplete, and the Save button is an odd shade.

Project, Verb, Context and Due date should be showing values from the database record.

The Save button should be the same color as the Save + Copy button. It’s shade is almost as though the button is being hovered, but not quite.

In short, it appears that Bubble simply left the page without finishing the load process. It doesn’t appear to have started the Page is loaded workflow.

There is a lot more I could say about what should be happening under the covers. For now, I’ll just provide a link to the editor.

https://bubble.io/page?type=page&name=index&id=lh-test-2&tab=tabs-1

It is based on the live app where things started to go wrong a month ago. I’ve added logging in the workflows to help determine what is happening. Perhaps that has made things worse, but I don’t know.

It may be helpful to take a look at my previous post with a lively discussion of problems I’ve encountered that led me to create this scaled down app for public viewing.

All help is appreciated.

Is this for the index page? Maybe I’m missing something, but there seem to be no workflow steps under Page is loaded event.

I’m not seeing any of these buttons when running. Can you add some basic steps to navigate to this point? example 1. run as user xyz, 2. open page wxy, 3. click button abc

@mishav If you click the pencil edit icon in one of the cells on the index page, that will direct you to the action-detail page with the form shown in Laurence’s screenshot.

The page type is Action, but it seems that sometimes the Current Page Action’s Project field is empty, causing the dropdown to not populate any information. There is a “When page is loaded workflow” on the action-detail page which looks like it may not be executing as expected. For example, the “Create a new Log” should run every time, but it does not.

@laurence Just wanted to double-check, is it intended that when a new Action is created, that the Project field remains empty until the User goes to the action-detail page? It looks like many of the Create a new Action actions update the “Project Name” field for the new Action, but not the “Project” field. I see that you have a custom event workflow which assigns a Project to an Action if the Project Name field is not empty, but it looks like that workflow does not always execute - is this what you’re experiencing as well?

Regarding the green button, this is definitely not obvious, but because some of the inputs and dropdowns on the action-detail page are marked as “This input should not be empty”, that button isn’t clickable when those mandatory inputs are empty.

Bubble knows to make that button element not clickable since when that Button is clicked, its workflow uses one or more values from those mandatory inputs. The light green color can be changed if you check the styling of the Green button, the “When this button isn’t clickable” condition changes it to that light green:

1 Like

@fayewatson thanks for the navigation tips.

@laurence expanding on Faye’s point, re Action’s Project …

page: action-detail
workflow: Custom Update Action Detail
first step, ProjectName is set, but Project is not …
image

The next step refers to Action’s Project, so it’d get the old value …
image

The next step modifies the old Project to add the Action to the list …
image

then removes the Action from the “projectWas” project in the next step …
image

1 Like

Unrelated to the Actions, but could you also not get the debugger to show? I temporarily removed the custom event “Set Reference Values” from the “When page is loaded” workflow, and now the debugger is showing though I’m not sure why? May be a bug?

A quick FYI, “Results of step 1” has no advantages or synchronous meaning vs writing as “Current Workflow Action”.

The debugger is showing for me, do you mean that it now shows after removing and re-adding the trigger step?

@mishav Initially, the debugger was showing at all times, but it would not expand and do a step-by-step for the “when the page is loaded” action. Also, when I would load the action-detail page, the Create a New Log action was running at all, which made it seem like that pageload workflow was not running at all?

I cloned the page and removed the event’s actions, and then re-added them one by one. The only time the log action and the debugger didn’t expand was when that custom event was within the on page load event. I did remove it and put it back on the original test-detail page, and now everything is working at all times for me as well (so maybe just my computer?)

1 Like

@fayewatson sounds like the original workflow step was corrupted, I’ve seen similar in the past. Perhaps as a test, @laurence can copy over the test-detail page again from the original app, and see if that behaves the same?

2 Likes

@laurence Well, the action-detail page on your test app works now. Or at least the onPageLoad works.

I would love to tell you that I discovered some secret logic error the escaped the keen eyes of both @fayewatson and @mishav but ummm…I did it the old fashioned grunt hacker way. I figured that something on the page must be stopping the onLoad event from firing and thought about removing items one by one until I found it, but that was going to take forever so in a fit of “what the hell” I deleted EVERYTHING from the page and then loaded it, and the onPage event fired. So then I undid the deletion of everything, loaded the page again and POOF it works.

  1. That seems to indicate some kind of corruption that got fixed when the page got…“recompiled” after undoing the deletions? maybe? sort of?
  2. Seems like a bug to report. If Bubble can’t prevent this from happening, there ought to be a way to say “recompile my page” (I realize recompile is probably the wrong word here) to deal with issues like this.

Also, something I noticed when poking around. You set the background color of some buttons conditionally to make them seem unclickable but you aren’t ALSO setting them to BE unclickable, so they still work. If you meant to make them not work, you have to set the ‘this element isn’t clickable’ property in the condition.

Marc

2 Likes

Thank you, Faye and @mishav, for jumping in.

Sorry I left out the “operator’s guide” to get you to the action-detail page. :confused: I was in a rush to post the broken app and head out to a meeting.

To get from the actions list to action-detail you click on the pencil, as Faye stated, or you click on the Action name.

@fayewatson, most of the Actions in this example is old and doesn’t have Project populated. When I have all the UI elements working with Project rather than ProjectName, I’ll run an update on all the Actions to populate Project. Then, going forward, there should never be an Action without Project populated. At that point, ProjectName will be removed from the Action type since it will be available from the Action’s associated Project.

Until Project is completely integrated and ProjectName can be removed from Action, the page loaded workflow triggers Link Project Name to Project to complete the association for that Action. You are right that nothing in the Page is loaded workflow is running.

Some of the Actions I kept in the database are very old, therefore may not have field data currently required by the action-detail page. So, with your explanation, I understand why the Save button is the lighter green. Thank you.

(I see that @mguerrasio did some work that seems to have gotten the Page is loaded workflow to run. I don’t understand what he did but I’ll address that in a separate message. I’m trying to address some of your and @mishav’s questions and observations first.)

@mishav,

Actually, Project is set much farther down the list of fields, so the next step does, in fact, have the new Project to work with. (One frustration I have with Bubble is that I don’t see any way to control the order of fields in a Make changes step. Do you know of a way to move fields around in the list?)

This sequence of linking the Action to the new Project and removing it from the Actions list of the old project does work correctly.

This is the kind of inconsistent behavior I’ve been struggling with for the past month+. (@emmanuel, can you see why I’ve been so frustrated with Bubble?)

Thanks for jumping in, Marc. The good news is that this weird behavior is not something I did wrong but cannot see. :slight_smile: The bad news is I don’t understand what you did. :frowning:

Is this the process you used?:

  • Select all elements on the page and press delete.

  • In preview, opened the page either by clicking an Action on the index page or simply doing a reload of the action detail page.

  • In design, click the undo icon:
    image

  • In preview, reload the page.

Today, I am not a professional programmer, but I had thirty years of programming experience up until about ten years ago. I’ve never experienced the kinds of bad behavior of the development environment (IDE), interpreters, compilers, debuggers or other tools I am experiencing with Bubble.

Perhaps I vent inappropriately, but if this is how Bubble is, I need to make a hard decision of whether or not to stick with it. And if I stick with it, I need to know the kinds of tricks you, @fayewatson, @mishav and other experienced Bubblers use so I don’t keep burning weeks of time on bad behaviors I didn’t create.

Again, I thank you for jumping in. Perhaps now I can peal back one layer of the onion and address deeper issues that must be resolved to make my app usable.

** Warning - I am going to use the words ‘meta-data’ and ‘compile’ in the post a placeholders for processes in Bubble that I am not clear on**

@laurence Yes, I did the steps you referenced.

I can actually accept that it is possible that there was a corruption of the meta-data associated with the page such that it prevented the onPage event from firing and that deleting everything (clearing the meta-data) and then undoing the delete (causing the meta-data to get re-built) could solve it.

I have worked in other environments where caching or a corrupted build or config file causes problems. The difference is, there is usually a process you can find, if you Google diligently, that explains how you can deal with such issues. Given that Bubble hides so much of the complexity, it is, IMO, their responsibility to provide the tools to solve these issues. They have an App optimization feature that clearly assesses the code-base and finds meta-data that is superfluous. Given that deleting and un-deleting elements fixed your issue, it would seem pretty trivial for Bubble to have a “Recompile this Page” button that would rebuild the meta-data for an existing page.

Marc

2 Likes

@laurence Thank you for clarifying. With regard to the page load workflow not running, I think @mishav’s suggestion to create another example app would definitely be best to do next. In your main app, do you still have the error with the page load workflow not running? If so, I would keep it there since the error itself and a way to reproduce is needed for the bug report.

The time-saving trick is to try to find the smallest, easiest to reproduce error and focus on giving the team the most detail in reproducing what you’re experiencing. For example, when I originally opened your test application, this is exactly what I did:

  1. Used the “run as” option in the User app data table, to log me into your User account, which opened up the index page.
  2. On the index page, I clicked the edit icon to navigate to the action-detail page (making sure the debugger is on, and using “Step-by-Step”)
  3. The action-detail page was loaded (the page data’s Action didn’t have a Project, which is one of the reasons some of the dropdowns didn’t populate any Project data).
  4. In the editor, I saw the “When page is loaded” workflow is supposed to Create a New Log Thing each time the page is loaded.
  5. I checked the App Data tab which showed that a new Log had not been created when I loaded the page (this is the first sign of a possible bug).
  6. I reloaded the page and noticed the debugger did not go through the Step-by-Step again on page load. When the debugger is on Step-by-Step it should automatically open anytime that “When page is loaded workflow” runs. This is the point where you can stop and send a bug report.

As @mguerrasio and @mishav stated, it sounds like removing the workflows and putting them back does at least provide a temporary fix. But, I think it’s easier for you and best for Bubble to file the bug before trying this fix in your main app. This way, Bubble is aware of any possible bugs that can be fixed before others may run into them, and if they suggest re-creating the workflows, they will let you know that as well.

After creating a second test app with the on page load error, and starting a bug report, it’s best to be as specific as possible in the “Bug Symptoms - Observed Issue” and “Step-by-Step Way to Reproduce” sections. For example, instead of saying “Page is not loading properly”, a more specific way would be, “The action-detail’s “When page is loaded” workflow is not running, though there are no conditions on the workflow.” Being overly specific will save you time from emailing back and forth with more details. Here is exactly what I would write in the bug report (incase this is helpful):

"Bug symptoms - Observed issue
On the “action-detail page”, the “When the page is loaded” workflow is not running, though there aren’t any conditions which should prevent it from running.

For example, the first action in that workflow is supposed to Create a New Log Thing every time the page is loaded, but it does not. I’ve tried to use the debugger (using “Step-by-Step”), but it does not expand and show the step-by-step of the “When the page is loaded” workflow.

Also, other actions in that “When page is loaded” workflow, which should run, are not running. That specific event is not running.

I’ve reached out to other Bubblers in the forum with a test application, and it seems that removing the workflows from the page and re-adding them provided a temporary fix. The thread on that is here: Page is not loading properly - closed - #14 by laurence. In this new test application, I have not removed the workflows and re-added them, in order for you to be able to see the observed issue.

Step-by-step way to reproduce (the more details the better)

  1. In the [name of the second test app], use “run as” for my account in the User data table. This will open the index page.
  2. On the index page, click one of the pencil icons in the repeating group cell. This will navigate you to the action-detail page (sending that cell’s Action thing as data to display on the action-detail page).
  3. Once the page is loaded, view the “Log” entries in the App data tab. There should have been a new Log entry created by the “When Page is Loaded” workflow, when you loaded the page, but a new Log entry is not created for me.
  4. Back on the action-detail page, try to use the debugger (showing “step-by-step”). Refresh the page. The debugger does not expand to show the step-by-step for the “When page is loaded” workflow as it is supposed to."

From there, Bubble will either suggest to recreate the workflow in the way it has been mentioned in this thread, and/or fix something on their end to prevent it from happening. With every Bubble bug report I’ve sent, the Bubble team has always been the first to say when the bug is on their end, and helpful to provide leads that help me fix the issue, or let me know that the fix is on their list.

Sorry for the length of this post, but I hope it is helpful and saves time when debugging in the future. Please let me know if you have any questions or if I can help in any way.

3 Likes

Thank you, Faye, and @mguerrasio and @mishav. This has been a very instructive thread.

Unfortunately, at this very moment, I’m not sure what my first problem with Bubble was a month ago. It seems that my attempts to fix or diagnose (with logs, pauses and other tricks) early problems led to more problems. If there was a “compile” or “meta data” problem early on, I have no idea how I may have clouded the real problem as I progressed (regressed?).

I will sleep on this and then pick it up Monday morning, California time.

Again, I thank you all for your contributions.

No worries at all - If there isn’t a “When page is loaded workflow” in your main app, like the one in the test app that isn’t running, I would start with the “step-by-step” debugger and just slowly go through the app, through as many pages and actions as you can.

As you go, if you come along a workflow event that doesn’t run at all, I would follow the bug report plan above (you’ll know it doesn’t run if the step-by-step doesn’t open on page load, or if Things aren’t being created, though there aren’t any conditionals on the workflow which would prevent the workflow from running).

If you come across behavior that occurs, but isn’t producing the expected result (i.e., a Thing wasn’t modified in the way you expected it to be modified), I would first use the debugger to see if the correct Things are being modified. If it’s still hard to tell whether it’s a possible error in the way the actions are set up, or a bug, feel free to share it here in this thread again (or I’m glad to take a look at the main app via PM if that makes things easier).

Sounds good :slight_smile:

I must say of late I have also been facing a myriad of problems that I cannot explain. I have been using bubble for over 2 years. I have built a massive application and have spent lots of time e.g. aligning HTML elements with text boxes etc. Now all of a sudden the elements overlay the text boxes and my page is not loading properly. Other weird behavior is linked to repeating groups not loading data. Database connector queries breaking and not saving for some reason which was an issue that could only be resolved by the bubble team.

Whereas I was initially excited about bubble and it’s capabilities I am now anxious as a lot of time and client promises have been made regarding bubble’s reliability. I don’t know what else to say.

@phuthi I know that sinking feeling, where stuff magically breaks when you’re working in another area.

I wonder if there is a certain size where the app becomes unreliable? Perhaps Bubble have identified a correlation of size to reliability?

For one example, when I reached near a hundred API calls defined, the API connector became extremely slow in the editor (5 seconds response from any click or edit), started losing results and being unable to reposition calls, and took Bubble team’s help to fix some corruption.