The good old DX error

I do not want to distribute my AIA here openly, to be honest. Hope for your understanding.

Yes, I have read this monster list several times, but bottomline it does not guide me to the point where I would understand what is wrong and what I would need to change.

Hi @ABG ,
this is what I also fear.
I have to say, it endagers my trust in the AI development environment, as this error is so vage... what is that supposed to be: "Error in DX, not because of an issue in your coding"
How can I feel comfortable in developing my project further if I always have to fear that shitty error message?
And obviously one cannot deep-dive into that error to find out what the server really complains about.
Well, yes, my project is maybe large, containing only ONE screen and this screen holds 13.100 blocks, but is that so un-common?
I am quite frustated.
Open for any ideas / hints.
Bye, Oliver

Have you tried building on code.appinventor.mit.edu yet?

Yes, i have brought my project over to the Code Server, but same behaviour there.

But i was actually wondering, what is the difference on the code Server anyway?

It's based on Amazon servers, with longer time slices allocated to service requests, at more $ cost to MIT.

To preserve your investment, I recommend getting the browser extension from our Blocks Editor FAQ and downloading block images of all the procedures and events in your project, for recoverability into a fresh project.

Ah, wow. Thats maybe an interesting approach that you recommend. I have never thought of starting over again in a new Project (apart from downloading Aia and uploading it again).
I think i have this Extension already and I saw the function to download PNG Files of the blocks.
But would that mean i would need to re-build all the screen elements in the Designer?

And can you explain please why this "start over" would maybe solve my problem better that doing the aia export /re-import? Is there a technical reason behind your recommendation to choose that way?

Thanks, Oliver

The Designer has Copy (Ctrl-C) and Paste (Ctrl-V) capabilities at various levels, from Screen through Arrangement down to individual component. The exports can be stored as Notepad text files, and reloaded from those later if you like.

Having fine grained backup of draggable components and blocks gives you the capability of manipulating parts of your work outside your original project.

Fine grained reloadable exports can be used for risk management, like not having all your eggs in one basket.

You still have a ton of code, but now can shovel gravel instead of boulders.

1 Like

Thank you, Abraham, that actually gives me back some hope to overcome my problem.
Will try this weekend and will let you know.

usually the error means, you have too much of something in your blocks... (by @Boban)
for example if you have too much blocks in a screen, try to split it into 2 screens...
Taifun

2 Likes

What i did now: I reduced texts that i had in some Text blocks and put them into a CSV file that i read at startup.
That reduced not significantly the amount of blocks (i think only 10 text blocks are gone now), but the amount of Text.
Now it works again, even with my two tiny procedures activated.

Thanks for your help!

But still i need to say that i mistrust the AI2 development environment, as i do not know WHEN and for What REASON the DX error might come again if I go on making add-ons to my project.

1 Like

The root cause of the DX error is too many triggers in an app.

So the basic way to get rid of this error that belongs to you is to generalize or summarize all your triggers like the block below.

or

1 Like

Hi Profi,
I did that. I replaced 12 single WhenButton.Click triggers with 1 AnyButton.Click trigger and after that change I now receive the DX error agin (which recently before that change I did not receive anymore) - all very strange.
KR, Oli

It's been a long time since your last article, I think you are having a problem with your internet connection.

Try a few more times, it will work.

I worked so hard on the solution of this issue that it is no longer a problem for me. If you can upload a picture of the blocks I'll check it out.

That is totally uncommon. A typical 'large' Project using several Virtual Screens would be 2000 to 3000 Blocks.

13,100 Blocks suggests there is some room for code optimization.

Oliver, if your Project is going to be rescued, you will have to make it available to the Power Users.

That is not the root cause, it is one of the causes of too many Blocks.

Also "get component" delivers the ID of one component, so your 'and' logic is not correct.

What I mean to be clear is that instead of using all the triggers one by one, if we can program a single trigger in a block (when any Button.Click), you won't get a DX error. I have seen and proved with a very long study that the excessive number of blocks does not cause DX either.

The first example will not work... a component can't be Button1 and Button2 at the same time... you have to use the OR operation...

Taifun

1 Like

ok.

correction, or.

I just wanted to give a quick example.

Could you show us the study, so we could repeat it ourselves?