Solutions to Common Problems: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Additional server requirements for .appcache file.
 
(57 intermediate revisions by 4 users not shown)
Line 1: Line 1:
=== My app gets an error box when run on a device, or it does not run in Airplane mode. ===
Only the first few are actually common - there isn't much that goes wrong.
[[File:TN01.01.png]]<br />
 
=== Cross-Origin-Resource-Policy errors when starting your app ===
 
If you get Cross-Origin-Resource-Policy errors when using Start in Local Browser , use Deploy to Local Folder instead. This can happen if your app accesses APIs or resources on other sites.
 
=== This serial number has been disabled. ===
 
Certain licenses, such as Student Term Specials, allow just one installation. If you try to install more than once, you will get this message. If you feel it is in error, please contact support@appstudio.dev.
 
=== Failed to Execute script AppStudio ===
 
This can happen you first install the current version AppStudio, then try to install Version 6, which is a few years old. Your options are to continue using the current version (you may need to [https://www.appstudio.dev/i/Subscription/ get a subscription]) or to [[Solutions_to_Common_Problems#How_can_I_do_a_complete_uninstall.3F|completely uninstall AppStudio]] before doing the new installation.
 
=== I get "macOS cannot verify that this app is free from malware" on installation ===
 
With Catalina, Apple upped their security requirements on apps.
 
This happens frequently with apps which do not come from the Apple Store. It doesn't mean there is a problem - it just means that Apple does not know the app. Here's the workaround:
<ol>
<li>Go to System Preferences, and open Security & Privacy.
<li>In the General Tab, under Allow apps downloaded from, you should see the app you’ve been tying to open – click on the Open Anyway button to its right.
<li>You will once again see a warning message that tells you the app cannot be verified as safe, but this time you will have the option to open it anyway. If you are certain you want to execute the app, click on Open.
Once you do that, you will no longer get the “MacOS cannot verify that this app is free from malware” warning whenever you try to open this particular program, as it will now be added to the exceptions list.
</ol>
 
=== How can I do a complete uninstall? ===
 
On Windows, do the following:
# use the Windows uninstall mechanism.
# Get rid of '''NSB AppStudio''' folder in c:/Program Files (x86) if it is there.
# Get rid of '''NSB AppStudio''' folder in c:/Program Files if it is there.
# Remove the registry entry:
## Start RegEdit (Windows Start button, enter regedit)
## Find HCU\Software\NSBasic\App Studio.
## Delete it.
# Install and restart AppStudio and enter your serial number again.
 
On MacOS,
# Drag AppStudio from Applications to the Trash
# Delete ~/Library/Preferences/App Studio Preferences. ([https://www.macrumors.com/how-to/reveal-library-folder-in-macos/ Don't see a Library folder?])
 
=== Does AppStudio keep a log? ===
 
Yes. You can view the log in AppStudio's About screen.
 
To look at it without starting AppStudio on Windows:
 
~\AppData\Roaming\App Studio\Logs
 
MacOS:
 
~/Library/Application Support/App Studio/Logs
 
=== When I try to reset my VoltServer password I get a message "Unauthorized". What do I do? ===


This means it is trying to use a file that has not been cached on the device. In Project Properties, check that all the images and files are listed in the manifest.
Account activations expire after an hour. Fortunately, getting a new link is easy:
<ol>
<li>Navigate to https://dashboard.voltcloud.io/.
<li>Click on “Forgot your password?”
<li>Enter in the email address you registered with.
<li>A new email should arrive shortly.
</ol>


# Open a new Chrome window on the desktop.
=== "Chrome can’t find *.min.map" ===
# Open the [[Using_the_Chrome_Debugger|Chrome Debugger]] by clicking ctrl shift J on the keyboard. (option command J on Mac OS)
# Enter the URL of your program on your deploy site and hit enter.
# In the message panel at the bottom of the screen, you will see the files it caches.
# Make sure all the files your app uses appear without errors.
# Check the mime type on the manifest file at http://web-sniffer.net. It should be <code>text/cache-manifest</code>. The path to enter will be <project path>/OfflineApp.appcache. (.manifest for older projects). If it is incorrect, see [[Distributing_your_App#Setting_up_your_server_for_manifest_files_.28Apache.29|Setting up your server for manifest files]].
# Check to make sure that Private Browsing is not turned on.
# If possible, use the Chrome browser on Android devices (not the older Android browser).
# If all else fails, try clearing the cache of your browser. On iOS 6, do this by Settings...Safari...Advanced...Website Data...Edit...wipe out nsbapp.com (or the name of your server)
<br />
Also ... the same error can occur if your server does not understand the mime type of your manifest. To correct this, make sure the directory which serves up the application has the .appcache extension described as "text/cache-manifest". In the case of an IIS installation, select the directory that is serving up you application, double-click "Mime Types" then add a new one if it isn't already there.  Here's how it looks using the Microsoft IIS manager ...


[[File:iis-mime-type.png]]<br />
[[File:Screen Shot 2020-03-04 at 10.26.10 AM.png]]


=== When I run my app on the desktop, I just get a blank screen. ===
It’s not one you need to worry about. It only happens when you are running with the Chrome Debugger open. It’s complaining that it does not have the extra files it needs to display the source code properly. Since it is very unlikely that you will have any need to look at that code, it doesn’t matter.


Your program is probably getting an error. Hit Ctrl-shift-J (option-shift-j on Mac) to open the [[Using_the_Chrome_Debugger|Chrome Debugger]] (assuming you are using Windows Chrome). You'll see the error.
If it really bugs you, you can go into the Debugger Preferences and turn off the warning. The setting to turn off is “Enable Source Maps”.


=== My app runs OK on the desktop, but nothing appears on the device. ===
=== When I run my app on the desktop, I just get a blank screen. ===


Check if JavaScript is turned off on the device.
Your program is probably getting an error. Hit F12 (option-shift-j on Mac) to open the [[Using_the_Chrome_Debugger|Chrome Debugger]] (assuming you are using Windows Chrome). You'll see the error.


=== Parts of the IDE are distorted or do not pop up properly in Windows. ===
=== Parts of the IDE are distorted or do not pop up properly in Windows. ===
Line 32: Line 81:
=== The background on the Design Screen is blank. ===
=== The background on the Design Screen is blank. ===


* If you are running on a Mac using Parallels, make sure that 'My Documents' in Windows is not mapped to its Mac equivalent.
If you are running on a Mac using Parallels, make sure that 'My Documents' in Windows is not mapped to its Mac equivalent.
* If you installed to a server, move \Documents\NS Basic Samples\ to your local system. Write access is required to that directory.


=== In the Code Window, I cannot enter ', " or extended characters ===
=== In the Code Window, I cannot enter ', " or extended characters ===
Line 54: Line 102:


Are you using an HTMLview control anywhere in your project? If so, check that the innerHTML value is valid and complete HTML. For example, forgetting to match a &lt;div> or &lt;font> tag with a matching &lt;/div> or &lt;/font> tag will cause other problems in your project.
Are you using an HTMLview control anywhere in your project? If so, check that the innerHTML value is valid and complete HTML. For example, forgetting to match a &lt;div> or &lt;font> tag with a matching &lt;/div> or &lt;/font> tag will cause other problems in your project.
=== QuotaExceededError  ===
The full message is "QuotaExceededError: DOM Exception 22: An attempt was made to add something to storage that exceeded the quota.". It will show up in the debugger console. This can happen on an iOS device with Safari in Private mode. When in Private mode, Safari is not allowed to write to [[localStorage]]. Have the user turn Private mode off.
=== TypeError: must be string without null bytes or None, not str ===
The full message ends with this:
<pre>
  File "C:\Files\nsbx\Setup\build\AppStudio\out00-PYZ.pyz\mimetypes",  line 254, in read_windows_registry
TypeError: must be string without null bytes or None, not str
</pre>
You probably have corrupted registry entries from malware. Run this utility: https://technet.microsoft.com/en-us/sysinternals/bb897448.aspx
It needs to be run on HKLM, HKCU and HKCR. When complete, export the entries which are reported and delete them.
=== My app gets an error box when run on a device, or it does not run in Airplane mode.  ===
[[File:CacheError.png]]<br />
(Starting from AppStudio 7.4, this message no longer appears. [[Progressive_Web_Apps|PWA]] apps do not have this issue.)
This means it is trying to use a file that has not been cached on the device. In Project Properties, check that all the images and files are listed in the manifest.  In certain cases it could mean the application cache on your device is corrupt.
# Open a new Chrome window on the desktop.
# Open the [[Using_the_Chrome_Debugger|Chrome Debugger]] by clicking F12 on the keyboard. (option command J on Mac OS)
# Enter the URL of your program on your deploy site and hit enter.
# In the message panel at the bottom of the screen, you will see the files it caches.
# Make sure all the files your app uses appear without errors.
# Use Check Deployment on the Run menu to check your server. If it is incorrect, see [[Distributing_your_App#Setting_up_your_server_for_manifest_files_.28Apache.29|Setting up your server for manifest files]].
# Check to make sure that Private Browsing is not turned on.
# Make sure Cookies are not turned off in your browser.
# If possible, use the Chrome browser on Android devices (not the older Android browser).
# Try clearing the cache of your browser. On iOS, do this by closing all tabs in Safari, then opening Settings...Safari. First clear history and your cache. Then go to Advanced...Website Data...Edit...wipe out nsbapp.com (or the name of your server). Finally restart your device.
# Make sure the server you loaded from is online.
To suppress this message, add this line of code in Sub Main()
<pre>
  window.applicationCache.removeEventListener("error", NSB.oncache, False)
</pre>
Use this statement with extreme caution: in nearly every case, the Error message is reporting something that needs to be fixed. It can be reenabled by removing the line above, or alternatively using an error handler of your own design with this code:
<pre>
  window.applicationCache.addEventListener("error", myFunc, False)
</pre>
where myFunc is a function in your own code.

Latest revision as of 13:13, 17 June 2024

Only the first few are actually common - there isn't much that goes wrong.

Cross-Origin-Resource-Policy errors when starting your app

If you get Cross-Origin-Resource-Policy errors when using Start in Local Browser , use Deploy to Local Folder instead. This can happen if your app accesses APIs or resources on other sites.

This serial number has been disabled.

Certain licenses, such as Student Term Specials, allow just one installation. If you try to install more than once, you will get this message. If you feel it is in error, please contact support@appstudio.dev.

Failed to Execute script AppStudio

This can happen you first install the current version AppStudio, then try to install Version 6, which is a few years old. Your options are to continue using the current version (you may need to get a subscription) or to completely uninstall AppStudio before doing the new installation.

I get "macOS cannot verify that this app is free from malware" on installation

With Catalina, Apple upped their security requirements on apps.

This happens frequently with apps which do not come from the Apple Store. It doesn't mean there is a problem - it just means that Apple does not know the app. Here's the workaround:

  1. Go to System Preferences, and open Security & Privacy.
  2. In the General Tab, under Allow apps downloaded from, you should see the app you’ve been tying to open – click on the Open Anyway button to its right.
  3. You will once again see a warning message that tells you the app cannot be verified as safe, but this time you will have the option to open it anyway. If you are certain you want to execute the app, click on Open. Once you do that, you will no longer get the “MacOS cannot verify that this app is free from malware” warning whenever you try to open this particular program, as it will now be added to the exceptions list.

How can I do a complete uninstall?

On Windows, do the following:

  1. use the Windows uninstall mechanism.
  2. Get rid of NSB AppStudio folder in c:/Program Files (x86) if it is there.
  3. Get rid of NSB AppStudio folder in c:/Program Files if it is there.
  4. Remove the registry entry:
    1. Start RegEdit (Windows Start button, enter regedit)
    2. Find HCU\Software\NSBasic\App Studio.
    3. Delete it.
  5. Install and restart AppStudio and enter your serial number again.

On MacOS,

  1. Drag AppStudio from Applications to the Trash
  2. Delete ~/Library/Preferences/App Studio Preferences. (Don't see a Library folder?)

Does AppStudio keep a log?

Yes. You can view the log in AppStudio's About screen.

To look at it without starting AppStudio on Windows:

~\AppData\Roaming\App Studio\Logs

MacOS:

~/Library/Application Support/App Studio/Logs

When I try to reset my VoltServer password I get a message "Unauthorized". What do I do?

Account activations expire after an hour. Fortunately, getting a new link is easy:

  1. Navigate to https://dashboard.voltcloud.io/.
  2. Click on “Forgot your password?”
  3. Enter in the email address you registered with.
  4. A new email should arrive shortly.

"Chrome can’t find *.min.map"

It’s not one you need to worry about. It only happens when you are running with the Chrome Debugger open. It’s complaining that it does not have the extra files it needs to display the source code properly. Since it is very unlikely that you will have any need to look at that code, it doesn’t matter.

If it really bugs you, you can go into the Debugger Preferences and turn off the warning. The setting to turn off is “Enable Source Maps”.

When I run my app on the desktop, I just get a blank screen.

Your program is probably getting an error. Hit F12 (option-shift-j on Mac) to open the Chrome Debugger (assuming you are using Windows Chrome). You'll see the error.

Parts of the IDE are distorted or do not pop up properly in Windows.

Check if you are using an Aero theme on your desktop. Try switching to a non Aero theme.

The background on the Design Screen is blank.

If you are running on a Mac using Parallels, make sure that 'My Documents' in Windows is not mapped to its Mac equivalent.

In the Code Window, I cannot enter ', " or extended characters

If you are running on Mac OS, do not use "USA International PC" as your keyboard layout. It uses the single quote character (') to start entering some extended characters. The single quote is important in the code window to quote strings and start comments.

I'm running Anti Virus software. What could go wrong?

Norton: Blocks installation with a WS.Reputation.1 message. If an executable is unknown to Norton (perhaps it is new), it automatically quarantines it. Since we update AppStudio frequently, this happens occasionally. Just take it out of the quarantine and it will work. We have contacted Norton about this - they say they have removed the block.

McAfee: AppStudio runs slowly. McAfee has a Real Time Scanning option that intercepts every system call that the apps on your system make. On slower computers, this feature can bring the system to a crawl. Disable this feature to solve the problem.

Kaspersky: AppStudio does not run. We're not sure if this Kaspersky related, or a corrupted system which caused this one. The solution was to

  1. sfc /scannow, which resulted in the message that there were files to be repaired.
  2. update NVIDIA display driver of Jan 2013.

In the Design Screen, some of my controls do not appear

Are you using an HTMLview control anywhere in your project? If so, check that the innerHTML value is valid and complete HTML. For example, forgetting to match a <div> or <font> tag with a matching </div> or </font> tag will cause other problems in your project.

QuotaExceededError

The full message is "QuotaExceededError: DOM Exception 22: An attempt was made to add something to storage that exceeded the quota.". It will show up in the debugger console. This can happen on an iOS device with Safari in Private mode. When in Private mode, Safari is not allowed to write to localStorage. Have the user turn Private mode off.

TypeError: must be string without null bytes or None, not str

The full message ends with this:

   File "C:\Files\nsbx\Setup\build\AppStudio\out00-PYZ.pyz\mimetypes",  line 254, in read_windows_registry

TypeError: must be string without null bytes or None, not str

You probably have corrupted registry entries from malware. Run this utility: https://technet.microsoft.com/en-us/sysinternals/bb897448.aspx

It needs to be run on HKLM, HKCU and HKCR. When complete, export the entries which are reported and delete them.

My app gets an error box when run on a device, or it does not run in Airplane mode.


(Starting from AppStudio 7.4, this message no longer appears. PWA apps do not have this issue.)

This means it is trying to use a file that has not been cached on the device. In Project Properties, check that all the images and files are listed in the manifest. In certain cases it could mean the application cache on your device is corrupt.

  1. Open a new Chrome window on the desktop.
  2. Open the Chrome Debugger by clicking F12 on the keyboard. (option command J on Mac OS)
  3. Enter the URL of your program on your deploy site and hit enter.
  4. In the message panel at the bottom of the screen, you will see the files it caches.
  5. Make sure all the files your app uses appear without errors.
  6. Use Check Deployment on the Run menu to check your server. If it is incorrect, see Setting up your server for manifest files.
  7. Check to make sure that Private Browsing is not turned on.
  8. Make sure Cookies are not turned off in your browser.
  9. If possible, use the Chrome browser on Android devices (not the older Android browser).
  10. Try clearing the cache of your browser. On iOS, do this by closing all tabs in Safari, then opening Settings...Safari. First clear history and your cache. Then go to Advanced...Website Data...Edit...wipe out nsbapp.com (or the name of your server). Finally restart your device.
  11. Make sure the server you loaded from is online.

To suppress this message, add this line of code in Sub Main()

  window.applicationCache.removeEventListener("error", NSB.oncache, False)

Use this statement with extreme caution: in nearly every case, the Error message is reporting something that needs to be fixed. It can be reenabled by removing the line above, or alternatively using an error handler of your own design with this code:

  window.applicationCache.addEventListener("error", myFunc, False)

where myFunc is a function in your own code.