Why this error - Source and target classes must be identical

I just duplicated a vertical arrangement and renamed it. After renaming an error is coming
Error from Companion: Source and target classes must be identical
Then I checked the components. And I noticed that the screen name has changed to the component name which I have renamed.

Can anyone please help :slightly_smiling_face:

I solved that problem by adding a new screen and copying all the components and blocks from the old screen to the new screen. But I want to know why this error is coming?

Is this repeatable ?
Were there components inside the vertical arrangement ?
If so, which ones ?
Might help to track down where the issue is ?

No this is the first time I have got this error.
There are buttons, horizontal arrangement, labels, and textbox.

Can you make a test aia to see if it is ?

This is the aia- It is a big project so please look at the this screen - BuyAndViewShopItems
ATL_KV_EKM_Group_4_Prototype.aia (241.3 KB)

I am using some extensions :sweat_smile:


I tested your aia project. I was able to copy vertical and vertical scrolling arrangments without a problem on most screens.

Until I opened the BuyAndViewShopItems screen. Lots of flashing, screen did not open correctly, just some empty buttons, and the error message.

My guess is there is something strange going on in this screen/blocks that needs attention.

I have created a new screen and copied all the component to that screen. So now I have no problem

Is that any bug?

So, clearly a bug, but finding it's root is very difficult. I assume that if you repeat the action of duplicating a vertical arrangement in the new Screen, the error does not occur?

It is possible the error is in an extension. However, I can't check your project, I get an immediate "Server Error could not upload project. Please try again later".

  1. Are any extensions used for that specific Screen?
  2. Are any of the extensions recently introduced i.e. not tried and tested over a considerable length of time, such as Taifun's extensions?

Got it to upload

...when you open your Project, do you see a message similar to this:
"An internal error has occurred. Report a bug?"

The Blocks work area for the BuyAndViewShopItems is empty and the App Inventor display of the in-work-area items like the bin, zoom btns etc are all in the top-left corner. This does somehow iron itself out but, well, more than disconcerting. The warnings on two Blocks are also wrong, though this is a known problem and nothing to do with the main fault.

Is this the "bad" version of your project or the "fixed" version? Either way, it might well be safer to start a new project from scratch.

I notice that there is a lot of discussion about the Custom Dialog extension. Ensure you have the latest version. Developed for Kodular, it might not be 100% compatible with App Inventor.

I see that, in the Blocks Tree, the Screen "BuyAndViewShopItems" has acquired the name "IncrementalDialog", as you described above.

Also notable is that some of your images are too large dimensionally and need to be optimised for Android.

Screen Management errors are present too:
Screen1 already exists, this opens another Screen1.

I have corrected the errant Screen name by editing the Project's .aia (.scm) file:

ATL_KV_EKM_Group_4_Prototype2.aia (241.3 KB)

Thank you @ChrisWard, I have created a new screen and copied all components to that screen.
Now my problem is over. But that bug is still there in the old screen. :slightly_smiling_face:

But why is the screen name changing automatically? :thinking:

Can I delete that screen? :anguished:

I have created a checkpoint and deleted that screen. Now there is no problem. I have also created an APK and tested and there is no problem.

It should of course be impossible - which is why the extension is under suspicion. Let's see what Evan thinks about it.