Can't open app on phone

Try to

  1. uninstall and reinstall the app
  2. rename your project (e.g. to → BT_Arduino2.aia), build the APK and try again.

I uninstalled the app and removed all the apk files from the phone. I renamed it and uploaded it again. Some result, doesn't work.
When I do the same with @dora_paz her app it does work.

You can try to delete your project and import it all over again.

Culprit to this mystery is, project path and path mismatch..

This can also reflect even in APK but if memory serves it will be two paths in it, ai_sjoerd and ai_sjoerd1953nl and thereby won't work as it should..

@sjoerd1953 To confirm this, can you upload your not working APK to G-drive and share the link to it..

3 Likes

Here it is:

I renamed it in Original so I know this was my first version.

1 Like

Thanks as I suspected..

As you can see in the image, half of the files are in one folder and the rest in the other one

@ewpatton I have seen this on Kodular but not so much on MIT

2 Likes

Manifest:

2 Likes

In Manifest:

How can this happen? Maybe the project was imported from the old account to the new account by the MIT support?

2 Likes

Did you build this app from scratch with AI2 (with the same account)?

Hmm.......

Two immediate things come to mind as potential reasons this might have happened.

First, the project was edited/merged with another at some point and this resulted in the mixed packages.

Second, when importing a project we rename the files to match the current user. It's possible that during this operation an exception occurs (such as a Google App Engine timeout) that results in only some files being renamed. Because of a design constraint in App Engine, we cannot make this a transaction so the project isn't rolled back to a reasonable state. One workaround might be to try and import it into code.appinventor.mit.edu and see if this corrects the issue.

Yes, even importing the above project to ai2-server as different user solves the issue, project corrects it self..

1 Like

But you will get a different keystore
(so you have to change this if you want to publish this app on the Play Store).

Import to the "code" server, then export, and then re-import to the standard ai2 server.

You are right Anke, I think that's it!

No, I didn't build the app from scratch. A few years ago I made a start with AI and made an app for bluetooth. It didn't do what I wanted so I stopped. A few weeks ago I picked it up again, deleted a lot of buttons and blocks and used only the "bluetooth" blocks from the old app and build a new one around it.
I use my Google account to connect with the MIT app inventor and in the meantime I changed the e-mail address I use for my Google account form sjoerd@van-staveren.net to sjoerd1953nl@gmail.com

Does that explain it?

Have you transferred the projects yourself, do you export and import? Does an MIT employee help with this?

This is what I did:

  1. Export aia file from ai2.appinventor.
  2. Import aia file in code.appinventor.
  3. Created apk file in code.appinventor.
  4. Installed it on my phone: I can open it and use it.
  5. Export aia file from code.appinventor.
  6. Import aia file in ai2.appinventor.
  7. Create apk file in ai2.appinventor.
  8. Installed it on my phone and ....YESSSS...it works.

By the way: between 4 and 5 I deleted the app and the apk file from my phone.

As far as I am concerned the problem is solved and the "mystery" explained. Am I seeing that right?

Well, problem solved for your purposes Sjoerd but we need you to tell us step-by-step exactly how the project that fails was built, including changing accounts, to be sure we know how it went 'wonky'.

What I don't understand is, how the issue only affects you and not any one else that imports your project - if the paths issue is corrected when a project is imported, why did that not work with your new account?

Another concern is that teams working on the same project often pass the same project file to other team members to do their bit. Also Power Users often modify projects for stranded Users, yet this issue either does not occur or the APK somehow survives it.

So in conclusion, we need to find a way to either prevent this happening, correct it on the Desktop (not ideal) or have a checker-corrector in the App Inventor IDE.

..... a brilliant bit of detective work Boban :sunglasses:

I will try.

I have made a project on AI in 2017. It was a project where I could control a relay board with 12 relays connected to an Arduino with a HC06 BlueTooth shield. I never got that working properly so I stopped. I did upload it to my phone then, just to see how that worked and I had no problems then. I could open the app on my phone.

Two weeks ago I decided to give it another try. I logged in on AI with my google account. The project from 4 years ago was still available in My Projects. I opened it, made quite a lot of changes. I deleted buttons and blocks, added new buttons, a switch and blocks. Tried a few other things like a slider and a textbox. Deleted these and so on. I was just experimenting while connected to the AI companion on my phone. I got it working this time so I wanted to install it on my phone and then the problem began.

Between 2017 and now I did not change my Google account, I only changed the e-mail address I use to log in to that account from sjoerd@van-staveren.net to sjoerd1953nl@gmail.com. In the screenshot @Boban showed us you can see that the parts before the @ in those addresses match the parts that he highlighted (ai_sjoerd1953nl and ai_sjoerd).

Is that enough information?

1 Like

That's very good Sjoerd, much appreciated.

So somebody at MIT changed your login for you. This will be the point where the potential of a paths issue is introduced. I think it is possible that MIT could run a bespoke util to change the paths at the time the account ID is changed.