NSB.preMain not recognized

Hi,

My app has been working for a long time. Now it doesn’t.

My error message, on the Chrome console, is - “Uncaught TypeError: NSB.preMain is not a function”.

I write in Basic and I know nothing about Java.

** Please tell me how to make my app work again
(NSB/AppStudio version 8.5.4.0).

Thanks.

Is that the only message on the Chrome console?

(1) Yes, it is the only error message (there are three [unrelated?] warning messages).

(A) I have not looked at my app for a long time.

(B) I have never seen this message before.

(C) Because the app seemed to partially work despite this Chrome console error, I cleared the Chrome cache and browsing history, after which the app worked.
(It also works in the Opera and Microsoft Edge browsers - which I have never run the app in before).

(D) So it seems that even though I redeployed my app, partially and fully, to my server many times, something in the Chrome cache generated this error after a new version of AppStudio was made available.

I hope this makes sense to you and something has been learned from this problem, even if I myself have no idea what happened.

Thanks.

(2) Nevertheless, I now have an even larger problem:

When editing my app, 7 out of its 28 forms show up as blank with no labels, widgets, etc visible even though everything is listed in the “Project Explorer” window and clicking on them there shows their properties in the “Properties Window”.
But since I cannot see the labels etc, I cannot move them around etc…
(the other 21 forms are fine - I can see all of their labels etc perfectly)…

I will look to see if there is anything in the forum about this frustrating problem, and if I cannot solve it I will open a new topic ASAP.

Ray

Clearing the cache looks like it solved your first problem.

Are you getting any message on the console now? It might explain the new issue.

No, there are now no errors on the console
(there are 5 warnings - one about a Bootstrap slider and four 404 errors related to images on my server).

I cannot find anything in the forum about my new, crippling issue.

Any suggestions, or should I open a new topic?

Can you send me the URL to your app? (DM is fine).

Thanks.

The url is:

https://www.planprediction.org/Planticipate

If you tell it that you have used the app before and say that your name is ‘asdf’ (no quotes), then this will save you entering your demographic details.
Also, you can save time by clicking on a ‘Stored situation’ rather than entering a new situation yourself and using ‘Recorded scores’ instead of entering criterion scores yourself
(if your chosen situation has no recorded scores, go back and choose another stored situation).
But PLEASE, when and if the app asks you, NEVER tell it that you have been serious and honest when answering its questions
(the app learns from its serious and honest users, so you will mess up its data banks if you say you have been serious when you have not been).

To reiterate the problem:

  1. The app has 27 forms;
  2. Using the AppStudio editor in Design Mode, I cannot see the elements on seven of these forms, even though such elements are listed in the Project Explorer window and each element’s properties are shown and modifiable in the Properties window.
  3. The other twenty forms are fine and able to be designed.
  4. if I cannot see seven forms’ elements in Design Mode then I cannot alter their design.
  5. I exported some good and bad forms to a testing project, but in this project the problem persisted - the good forms could be seen and re-designed but the bad ones were still bad.

When running the app, the first bad form you will encounter (but you will be unaware of this) is the one asking you to enter a ‘situation’. The next two forms that respectively ask you to score the criteria and score plans for overall desirability are also bad. The next form, which asks what you then want to do, is good, but the ‘Sensitivity’ form is bad.

In short, the app works OK, but I am unable to redesign seven forms when editing it.

Thanks again.

It looks like this issue is more complex than it looked at first. I’ve seen this kind of thing before. One possible reason is a using the same name for a variable in your app as the name of a form or control.

Can you make a copy of your app, then use it to create the absolute smallest project that reproduces this problem? Take out everything that isn’t needed to make it happen. It’s the first thing I would have to do, but since you know your program inside out, you’ll be able to do in a fraction of the time.

Thanks
(I assume that I am talking to George).

I should have done what you suggest myself, but I alerted you on the off chance that it is happening to others who are using AppStudio’s latest version and you know why the problem arises.

I remember you teaching me some time back that the only way to fix an error prompted by a missing “End if” statement was to remove large chunks of code until the error disappears and then re-insert bits of the rejected code to see when the error re-appears and so track down the error gradually.
I have used this tactic several times since, and it looks like what you suggest is another form of it.

I will let you know the source of my problem after I have tracked it down within a few weeks.

Ray