AppOfflineError: Connection to server failed (1006)

What I’m trying to do:
Use anvil.server.call

What I’ve tried and what’s not working:
anvil.server.call sometimes results in AppOfflineError: Connection to server failed (1006) randomly, without any clues as to why it happens. I use try except and sleep(10) before making another 5 server calls within 50 seconds. Sometimes it works, sometimes doesn’t.

I checked out the following links as well, but still now find the solution. Any help is greatly appreciated.:

1 Like

Well… that’s how it should work.

The AppOfflineError part could mean that the Anvil server is down.
The Connection to server failed part could mean that the client can’t reach the server.

Usually, when you get this error, there is a connection problem, it has nothing to do with Anvil.

The connection between the client and the server hops many times and there are many points of failure.

Perhaps Anvil could do better to improve the description of the error in some cases, but when you deal with long distance (and also short distance) connections, you always need to manage the random failures, because you will always have random failures.

1 Like

Thanks so much for the insight, @stefano.menci.

What I really dont understand is that there is still the error even making 5 consecutive calls within 50 secs and the data is not sent back to the server at all.

Could be a connection problem that lasts longer than 50 seconds?
Are you having problems only with the running app or also with the IDE?
Are you having problems with all the instances of the app or one client works and one doesn’t (especially if the 2 clients are in two different cities/states/continents)?

It happens randomly with all of my clients. There is only one common, a particular server call with some data

I guess, server is not down as other server call works well during that time.

Thanks for the conversation. I think I need to do some more test to find the root cause.

I am in the same situation, it is in a single server call that uploads media to my server.

My best guess is the amount of data getting sent requires a longer sustained connection then the average server call.

Posting this in hopes it may help solve the problem.

I am getting the AppOfflineError: App is offline error as follows:

AppOfflineError: App is offline

at anvil-services/anvil/tables/_config.py:10
called from anvil-services/anvil/tables/__init__.py:36
called from anvil-services/anvil/tables/__init__.py:54
called from app/Common_Apps/TaskEdit/__init__.py:8
called from app/Common_Apps/Tasks/__init__.py:7
called from MainNav, line 8

Here is what is strange. This is a very simple application that I built to follow the tutorial on how to use the datagrid.

The application has been working fine since I wrote it a long time ago but today (9/23/2022) since around 6:30 Central Time (USA). I started getting the “AppOfflineError: App is offline” error, but only when I went into FireFox develop tools and switched to a responsive design mode. And only in FireFox.

My version of FireFox is 105.0 (64-bit) and running on Windows 10.

The application works fine in my other web browsers, even when I switch to responsive design mode.

I have tried clearing all the FireFox browser cache (everything) and still it will not work when I switch to responsive design mode.

I would share the application but I am guessing it will work for you since it works on my other browsers but not just my one Firefox browser, so something still has to be cached.

If I can’t figure it out, I will uninstall FireFox and reinstall and see if that fixes it.

Posting in case this helps to pinpoint what is going on between these web browsers and Anvil since the problem appears to be very intermittent and random (according to other posts I have read).

@ricketyler - thanks for reporting - do you have any obvious errors in the developer tools browser console?
if there’s one that looks a bit like failed to fetch that might be useful.

Thanks for the quick reply. I have to jump on my day job in a few mins, but I ran the app again in FireFox, put it into responsive design, got the error, cleared the console, did a refresh and got the error again and captured this from the console (hope it helps). If there are specific steps you want me to take I can, but will have to be after 5 pm CT (USA). Thanks – RickTyler

====== console log follows ==========

Lock REPL runner-repl-1: 3ms - timer ended store.js:222:28

Killing session with token SQYTJHSPNAI47BGCXRQPJYJFNYUPINH4=jnV5WpiKoKu5v1crjQfvnNrh3QOA runner.js:54:12

End debug session: 2ms - timer ended store.js:222:28

Stop app: 520ms - timer ended store.js:222:28

Nothing to save saving.js:138:20

Moving all changed app paths to pending save 3: 1ms - timer ended store.js:222:28

Focus bottom panel tab: 'repl': 8ms - timer ended store.js:222:28

Persist state to Indexed DB: 1ms - timer ended store.js:163:24

Partitioned cookie or storage access was provided to https://jvjnvfuc3zrh3p2q.anvil.app/debug/GGYEU5SZQQQ42EIRR6ONQ4VFMA3UJZ4C%3DNKA4PELJUPHJ6ERQ7NMOWAHG/_/debug?requestTime=1663937533985 because it is loaded in the third-party context and dynamic state partitioning is enabled.

This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. debug

JQMIGRATE: Migrate is installed, version 3.3.2 jquery-migrate.js:69:16

Cookie “_t” with the “SameSite” attribute value “Lax” or “Strict” was omitted because of a cross-site redirect. loading.gif

Cookie “__stripe_mid” with the “SameSite” attribute value “Lax” or “Strict” was omitted because of a cross-site redirect. loading.gif

Cookie “__stripe_sid” with the “SameSite” attribute value “Lax” or “Strict” was omitted because of a cross-site redirect. loading.gif

unreachable code after return statement builtin.js:258

unreachable code after return statement dict.js:577

unreachable code after return statement float.js:146

unreachable code after return statement reversed.js:13

unreachable code after return statement astnodes.js:1305

unreachable code after return statement compile.js:209

unreachable code after return statement compile.js:1506

unreachable code after return statement timsort.js:160

unreachable code after return statement skulpt.min.js:1159:12

unreachable code after return statement skulpt.min.js:1244:12

unreachable code after return statement skulpt.min.js:1264:16

unreachable code after return statement skulpt.min.js:1344:13

unreachable code after return statement skulpt.min.js:1641:16

unreachable code after return statement jsbi-umd.js:1:4097

unreachable code after return statement slotdefs.js:970

unreachable code after return statement formatting.js:5

unreachable code after return statement skulpt.min.js:93:16

unreachable code after return statement skulpt.min.js:221:16

unreachable code after return statement skulpt.min.js:274:180

unreachable code after return statement jsbi-umd.js:1:4097

unreachable code after return statement jsbi-umd.js:1:4097

unreachable code after return statement skulpt.min.js:58:72

unreachable code after return statement skulpt.min.js:91:72

unreachable code after return statement jsbi-umd.js:1:4097

unreachable code after return statement jsbi-umd.js:1:4097

unreachable code after return statement generic.js:167

unreachable code after return statement abstract.js:1298

unreachable code after return statement slotdefs.js:915

unreachable code after return statement skulpt.min.js:55:127

unreachable code after return statement skulpt.min.js:354:11

unreachable code after return statement skulpt.min.js:532:15

unreachable code after return statement skulpt.min.js:698:16

unreachable code after return statement skulpt.min.js:591:15

unreachable code after return statement skulpt.min.js:799:16

unreachable code after return statement skulpt.min.js:921:16

unreachable code after return statement skulpt.min.js:970:16

unreachable code after return statement skulpt.min.js:1033:16

unreachable code after return statement skulpt.min.js:1159:12

unreachable code after return statement skulpt.min.js:1244:12

unreachable code after return statement skulpt.min.js:1264:16

unreachable code after return statement skulpt.min.js:80:16

unreachable code after return statement skulpt.min.js:145:16

unreachable code after return statement skulpt.min.js:190:49

unreachable code after return statement skulpt.min.js:219:502

unreachable code after return statement list.js:231

unreachable code after return statement bytes.js:575

unreachable code after return statement tuple.js:149

unreachable code after return statement complex.js:159

unreachable code after return statement compile.js:2082

unreachable code after return statement compile.js:2785

unreachable code after return statement generic_alias.js:175

unreachable code after return statement skulpt.min.js:1127:16

unreachable code after return statement skulpt.min.js:1170:49

unreachable code after return statement skulpt.min.js:1187:523

unreachable code after return statement skulpt.min.js:442:16

unreachable code after return statement skulpt.min.js:485:49

unreachable code after return statement skulpt.min.js:510:755

unreachable code after return statement skulpt.min.js:611:16

unreachable code after return statement skulpt.min.js:985:11

unreachable code after return statement skulpt.min.js:1008:16

unreachable code after return statement skulpt.min.js:1054:16

unreachable code after return statement skulpt.min.js:1127:16

unreachable code after return statement skulpt.min.js:1170:49

unreachable code after return statement skulpt.min.js:1187:523

unreachable code after return statement skulpt.min.js:1641:16

New debug session: 3ms - timer ended store.js:222:28

unreachable code after return statement misceval.js:470

RPC Request (637 ms, 116 ms lost) server.js:729:28

unreachable code after return statement abstract.js:1087

unreachable code after return statement abstract.js:785

unreachable code after return statement slotdefs.js:1768

unreachable code after return statement descr.js:65

unreachable code after return statement str.js:647

unreachable code after return statement str.js:1436

unreachable code after return statement builtin.js:728

unreachable code after return statement bytes.js:410

unreachable code after return statement bytes.js:410

unreachable code after return statement slotdefs.js:908

unreachable code after return statement slotdefs.js:1375

unreachable code after return statement slotdefs.js:1385

unreachable code after return statement parse_tables.js:54

unreachable code after return statement astnodes.js:1160

unreachable code after return statement symtable.js:125

unreachable code after return statement compile.js:2653

unreachable code after return statement skulpt.min.js:1151:11

unreachable code after return statement skulpt.min.js:1270:17

unreachable code after return statement skulpt.min.js:1296:17

unreachable code after return statement skulpt.min.js:1752:142

unreachable code after return statement skulpt.min.js:1947:136

unreachable code after return statement skulpt.min.js:1998:11

unreachable code after return statement skulpt.min.js:2054:17

unreachable code after return statement skulpt.min.js:2118:252

unreachable code after return statement skulpt.min.js:2208:153

unreachable code after return statement skulpt.min.js:2256:11

unreachable code after return statement skulpt.min.js:2559:17

unreachable code after return statement skulpt.min.js:2848:17

unreachable code after return statement skulpt.min.js:3000:29

unreachable code after return statement skulpt.min.js:3093:29

unreachable code after return statement skulpt.min.js:3121:29

unreachable code after return statement skulpt.min.js:3423:29

unreachable code after return statement skulpt.min.js:3601:10

unreachable code after return statement skulpt.min.js:3884:17

unreachable code after return statement skulpt.min.js:3912:502

unreachable code after return statement skulpt.min.js:4104:17

unreachable code after return statement skulpt.min.js:4207:17

unreachable code after return statement skulpt.min.js:4258:17

unreachable code after return statement skulpt.min.js:4291:49

unreachable code after return statement skulpt.min.js:4316:768

unreachable code after return statement skulpt.min.js:4368:17

unreachable code after return statement skulpt.min.js:4396:29

unreachable code after return statement skulpt.min.js:4574:17

unreachable code after return statement skulpt.min.js:4794:17

unreachable code after return statement skulpt.min.js:4858:17

unreachable code after return statement skulpt.min.js:4918:17

unreachable code after return statement skulpt.min.js:4978:17

unreachable code after return statement skulpt.min.js:5057:29

unreachable code after return statement skulpt.min.js:5101:17

unreachable code after return statement skulpt.min.js:5249:17

unreachable code after return statement skulpt.min.js:5537:12

unreachable code after return statement skulpt.min.js:5647:12

unreachable code after return statement skulpt.min.js:5709:131

unreachable code after return statement slotdefs.js:1911

unreachable code after return statement str.js:219

unreachable code after return statement bytes.js:47:9

unreachable code after return statement bytes.js:502:21

unreachable code after return statement set.js:455

unreachable code after return statement ffi.js:396

unreachable code after return statement nonetype.js:93

unreachable code after return statement str.js:925

unreachable code after return statement str.js:1237

unreachable code after return statement str.js:437

unreachable code after return statement skulpt.min.js:274:12

unreachable code after return statement skulpt.min.js:287:29

unreachable code after return statement skulpt.min.js:302:75

unreachable code after return statement skulpt.min.js:316:29

unreachable code after return statement skulpt.min.js:243:40

unreachable code after return statement skulpt.min.js:298:40

unreachable code after return statement skulpt.min.js:463:29

unreachable code after return statement skulpt.min.js:482:29

unreachable code after return statement skulpt.min.js:638:302

unreachable code after return statement skulpt.min.js:672:182

unreachable code after return statement str.js:800

unreachable code after return statement list.js:484

unreachable code after return statement bytes.js:449:21

unreachable code after return statement int.js:37:49

unreachable code after return statement generator.js:126

unreachable code after return statement parse_tables.js:1210

unreachable code after return statement astnodes.js:202

unreachable code after return statement ast.js:1351

unreachable code after return statement Unicode.js:124

unreachable code after return statement skulpt.min.js:1240:16

unreachable code after return statement skulpt.min.js:334:17

unreachable code after return statement skulpt.min.js:451:18

unreachable code after return statement skulpt.min.js:479:17

unreachable code after return statement skulpt.min.js:559:143

unreachable code after return statement skulpt.min.js:655:29

unreachable code after return statement skulpt.min.js:734:29

unreachable code after return statement skulpt.min.js:762:29

unreachable code after return statement skulpt.min.js:833:29

unreachable code after return statement skulpt.min.js:1104:9

unreachable code after return statement skulpt.min.js:1240:16

unreachable code after return statement skulpt.min.js:219:204

unreachable code after return statement skulpt.min.js:229:10

unreachable code after return statement skulpt.min.js:229:169

unreachable code after return statement skulpt.min.js:710:11

unreachable code after return statement skulpt.min.js:790:11

unreachable code after return statement skulpt.min.js:888:16

unreachable code after return statement skulpt.min.js:1004:11

unreachable code after return statement skulpt.min.js:1151:11

unreachable code after return statement skulpt.min.js:1270:17

unreachable code after return statement skulpt.min.js:1296:17

unreachable code after return statement skulpt.min.js:1752:142

unreachable code after return statement skulpt.min.js:1947:136

unreachable code after return statement skulpt.min.js:1998:11

unreachable code after return statement skulpt.min.js:2054:17

unreachable code after return statement skulpt.min.js:2118:252

unreachable code after return statement skulpt.min.js:2208:153

unreachable code after return statement skulpt.min.js:2256:11

unreachable code after return statement skulpt.min.js:2559:17

unreachable code after return statement skulpt.min.js:2848:17

unreachable code after return statement skulpt.min.js:3000:29

unreachable code after return statement skulpt.min.js:3093:29

unreachable code after return statement skulpt.min.js:3121:29

unreachable code after return statement skulpt.min.js:3423:29

unreachable code after return statement skulpt.min.js:3601:10

unreachable code after return statement skulpt.min.js:3884:17

unreachable code after return statement skulpt.min.js:3912:502

unreachable code after return statement skulpt.min.js:4104:17

unreachable code after return statement skulpt.min.js:4207:17

unreachable code after return statement skulpt.min.js:4258:17

unreachable code after return statement skulpt.min.js:4291:49

unreachable code after return statement skulpt.min.js:4316:768

unreachable code after return statement skulpt.min.js:4368:17

unreachable code after return statement skulpt.min.js:4396:29

unreachable code after return statement skulpt.min.js:4574:17

unreachable code after return statement skulpt.min.js:4794:17

unreachable code after return statement skulpt.min.js:4858:17

unreachable code after return statement skulpt.min.js:4918:17

unreachable code after return statement skulpt.min.js:4978:17

unreachable code after return statement skulpt.min.js:5057:29

unreachable code after return statement skulpt.min.js:5101:17

unreachable code after return statement skulpt.min.js:5249:17

unreachable code after return statement skulpt.min.js:5537:12

unreachable code after return statement skulpt.min.js:5647:12

unreachable code after return statement skulpt.min.js:5709:131

unreachable code after return statement skulpt.min.js:160:17

unreachable code after return statement skulpt.min.js:178:40

unreachable code after return statement skulpt.min.js:238:49

unreachable code after return statement skulpt.min.js:255:532

unreachable code after return statement skulpt.min.js:327:17

unreachable code after return statement skulpt.min.js:337:11

unreachable code after return statement skulpt.min.js:369:17

unreachable code after return statement skulpt.min.js:477:17

unreachable code after return statement skulpt.min.js:477:102

unreachable code after return statement check.js:217

unreachable code after return statement slotdefs.js:1712

unreachable code after return statement descr.js:159

unreachable code after return statement str.js:433

unreachable code after return statement errors.js:325

unreachable code after return statement list.js:321

unreachable code after return statement errors.js:17

unreachable code after return statement list.js:332

unreachable code after return statement bytes.js:349

unreachable code after return statement dict.js:376:19

unreachable code after return statement property_class_static.js:64

unreachable code after return statement int.js:619

unreachable code after return statement complex.js:638

unreachable code after return statement enumerate.js:29

unreachable code after return statement parser.js:177

unreachable code after return statement astnodes.js:1087

unreachable code after return statement ast.js:163

unreachable code after return statement ast.js:2190

unreachable code after return statement ast.js:514

unreachable code after return statement builtindict.js:73

unreachable code after return statement skulpt.min.js:1136:17

unreachable code after return statement skulpt.min.js:1222:239

unreachable code after return statement skulpt.min.js:1290:239

unreachable code after return statement skulpt.min.js:1323:30

unreachable code after return statement skulpt.min.js:1355:17

unreachable code after return statement skulpt.min.js:1381:30

unreachable code after return statement skulpt.min.js:1413:17

unreachable code after return statement skulpt.min.js:1502:17

unreachable code after return statement skulpt.min.js:1534:17

unreachable code after return statement float.js:177

unreachable code after return statement complex.js:42

unreachable code after return statement range.js:49

unreachable code after return statement parse_tables.js:44

unreachable code after return statement import.js:421

unreachable code after return statement skulpt.min.js:1175:12

unreachable code after return statement skulpt.min.js:1263:16

unreachable code after return statement skulpt.min.js:1401:16

unreachable code after return statement skulpt.min.js:1443:17

unreachable code after return statement skulpt.min.js:1498:23

unreachable code after return statement skulpt.min.js:1533:29

unreachable code after return statement skulpt.min.js:1937:163

unreachable code after return statement skulpt.min.js:2003:17

unreachable code after return statement skulpt.min.js:2029:17

unreachable code after return statement skulpt.min.js:2072:17

unreachable code after return statement skulpt.min.js:2100:17

unreachable code after return statement skulpt.min.js:2130:17

unreachable code after return statement skulpt.min.js:2163:49

unreachable code after return statement skulpt.min.js:2180:535

unreachable code after return statement skulpt.min.js:2193:29

unreachable code after return statement skulpt.min.js:2251:17

unreachable code after return statement skulpt.min.js:2315:14

unreachable code after return statement skulpt.min.js:2454:17

unreachable code after return statement skulpt.min.js:2495:17

unreachable code after return statement skulpt.min.js:2567:29

unreachable code after return statement skulpt.min.js:2606:9

unreachable code after return statement skulpt.min.js:2727:17

unreachable code after return statement skulpt.min.js:2753:29

unreachable code after return statement skulpt.min.js:2866:29

unreachable code after return statement skulpt.min.js:592:17

unreachable code after return statement skulpt.min.js:606:12

unreachable code after return statement skulpt.min.js:687:17

unreachable code after return statement skulpt.min.js:709:17

unreachable code after return statement skulpt.min.js:1027:12

unreachable code after return statement skulpt.min.js:1175:12

unreachable code after return statement skulpt.min.js:1263:16

unreachable code after return statement skulpt.min.js:1401:16

unreachable code after return statement skulpt.min.js:1443:17

unreachable code after return statement skulpt.min.js:1498:23

unreachable code after return statement skulpt.min.js:1533:29

unreachable code after return statement skulpt.min.js:1937:163

unreachable code after return statement skulpt.min.js:2003:17

unreachable code after return statement skulpt.min.js:2029:17

unreachable code after return statement skulpt.min.js:2072:17

unreachable code after return statement skulpt.min.js:2100:17

unreachable code after return statement skulpt.min.js:2130:17

unreachable code after return statement skulpt.min.js:2163:49

unreachable code after return statement skulpt.min.js:2180:535

unreachable code after return statement skulpt.min.js:2193:29

unreachable code after return statement skulpt.min.js:2251:17

unreachable code after return statement skulpt.min.js:2315:14

unreachable code after return statement skulpt.min.js:2454:17

unreachable code after return statement skulpt.min.js:2495:17

unreachable code after return statement skulpt.min.js:2567:29

unreachable code after return statement skulpt.min.js:2606:9

unreachable code after return statement skulpt.min.js:2727:17

unreachable code after return statement skulpt.min.js:2753:29

unreachable code after return statement skulpt.min.js:2866:29

unreachable code after return statement skulpt.min.js:387:12

unreachable code after return statement skulpt.min.js:448:17

unreachable code after return statement skulpt.min.js:474:143

unreachable code after return statement skulpt.min.js:529:49

unreachable code after return statement skulpt.min.js:546:533

unreachable code after return statement skulpt.min.js:572:17

unreachable code after return statement skulpt.min.js:600:17

unreachable code after return statement skulpt.min.js:693:17

unreachable code after return statement skulpt.min.js:754:17

unreachable code after return statement skulpt.min.js:785:17

unreachable code after return statement skulpt.min.js:816:17

unreachable code after return statement skulpt.min.js:847:17

unreachable code after return statement skulpt.min.js:879:17

unreachable code after return statement skulpt.min.js:1059:192

unreachable code after return statement skulpt.min.js:1136:17

unreachable code after return statement skulpt.min.js:1222:239

unreachable code after return statement skulpt.min.js:1290:239

unreachable code after return statement skulpt.min.js:1323:30

unreachable code after return statement skulpt.min.js:1355:17

unreachable code after return statement skulpt.min.js:1381:30

unreachable code after return statement skulpt.min.js:1413:17

unreachable code after return statement skulpt.min.js:1502:17

unreachable code after return statement skulpt.min.js:1534:17

unreachable code after return statement skulpt.min.js:154:79

unreachable code after return statement skulpt.min.js:236:326

unreachable code after return statement skulpt.min.js:259:17

unreachable code after return statement skulpt.min.js:315:17

unreachable code after return statement skulpt.min.js:395:81

unreachable code after return statement skulpt.min.js:447:239

Persist state to Indexed DB: 1ms - timer ended store.js:163:24

Python exception: AppOfflineError: App is offline runner.js:404:16

Object { "$d": {…}, "$s": [], args: {…}, traceback: (7) […], cause: null, context: null }

runner.js:408:20

Uncaught (in promise)

Object { "$d": {…}, "$s": [], args: {…}, traceback: (7) […], cause: null, context: null }

PyDefUtils.js:427:8

REPL Output (runner-repl-1): 11ms - timer ended store.js:222:28

Debug output: 4ms - timer ended store.js:222:28

Updating commit History history.js:437:12

Persist state to Indexed DB: 2ms - timer ended store.js:163:24

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:1616/hmr/__webpack_hmr. (Reason: CORS request did not succeed). Status code: (null).

Firefox can’t establish a connection to the server at http://localhost:1616/hmr/__webpack_hmr. client.js:88:13

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:1616/hmr/__webpack_hmr. (Reason: CORS request did not succeed). Status code: (null).

Firefox can’t establish a connection to the server at http://localhost:1616/hmr/__webpack_hmr. client.js:88:13

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:1616/hmr/__webpack_hmr. (Reason: CORS request did not succeed). Status code: (null).

Firefox can’t establish a connection to the server at http://localhost:1616/hmr/__webpack_hmr. client.js:88:13

Lost connection to Anvil websocket.js:29:24

Uncaught (in promise)

Object { type: "CONNECTION_ERROR", message: "Lost connection to Anvil" }

I had more time to troubleshoot this issue and here is some additional information.

  1. still only happening when I go into FireFox, Web Dev Tools and responsive design mode on this computer and my other browsers on this computer are fine when I use their web dev tools and responsive design modes.

  2. if I use “new private window” to make FireFox use the private window settings, which apparently makes FireFox use a separate cookie jar (see this link Website is displayed properly in private browsing mode, but not in regular Firefox mode | Firefox Support Forum | Mozilla Support ), the problem goes away. Meaning, I follow the exact same procedure noted above but I never get the error message. Even if I reload the page, no issue.

  3. if I go into a normal FireFox window (not in private mode), and follow the same procedure noted above above until the error message appears and then click the LOCK ICON in the URL window and select “clear cookies and site data” and refresh the page, the page loads fine. I can do searches in the data grid without issue but as soon as I reload the page, the error comes right back again. So problem appears to only be upon initial load or reload. Subsequent calls to and from Anvil database seem to have no issue once initial database load is made.

The above information would lead me to believe that something is being stored in the normal cookie jar/site data for responsive design mode that upon refresh makes FireFox think the application is offline (not sure what handshake between Anvil and FireFox causes this for a mobile/responsive design form factor).

I guess a workaround would be to capture this error and tell the browser to clear cookie and site data but I can’t begin to imagine how to do that unless there is some type of application session state that is coming into play.

I need to think about this one some more. It really isn’t an issue to me for any production reason right now since this is a completely throw away application and only occurring in this one browser. However, I can see how this could be a production issue in the future (based on other posts on this topic), so worth figuring out a workaround.

From your earlier description it also sounds like it’s only happening when running the app in the IDE?
(Indicated by the logging output)

I should have mentioned that it is occurring when running in Anvil IDE and when running via prod URL directly (outside the Anvil IDE).

1 Like

I think you all can now validate this on your end, since I have confirmed it is happening on two separate computers for me running the latest version of FireFox (not sure about earlier versions since I don’t have any) on Windows 10 (not sure about other Windows versions since I don’t have any).

I downloaded the latest version of FireFox to another computer and did the exact same process, even without going into the Anvil IDE, and the error showed up again as soon as I go into Web Dev Tools, click the responsive design icon and select any of the “phone types” listed by FireFox. Then click reload and get the exact same AppOfflineError.

Here is the link to the application: Simple Table

I am running 105.0.1 (64-bit) on Windows 10 and now consistently happening on 2 computers.

Remember you can get it to not happen by simply deselecting responsive design icon and reload or running in normal tab or running in a private window (that works even when doing responsive design procedure noted above).

This means that something sent back from Anvil to this version of FireFox in normal responsive design mode is throwing this error (from what I can tell).

Would love to know if anyone else is getting this on their end.

You can reproduce a form of this issue by copying the “Edit and Delete Rows” tutorial under the main “Data Grids: Displaying Data In Tables” tutorial page at this URL: Anvil | Data Grids: Displaying Data In Tables .

If you copy that version of the tutorial and load it into the latest version of FireFox on a Windows 10 computer and publish it. Copy the published URL and open in a new tab in Firefox. It will load fine. Then open web developer tools and choose responsive design and select one of the phone settings of your choice, and reload. You will either get a session expired page, a constant reloading spinning will or a very malformed page that kind of shows data but not like it should.

So not exactly the same error message but definitely close, because I have seen the session expired error in my application before I finally get the AppOfflineError.

Here is what is odd to me. If you copy the “Getting Started” tutorial from that same page it works every time no matter what you do with responsive design. At least for me. So something in the final version of that tutorial may be a part of the issue.

I am hopeful this may point the Anvil team in a direction as to what is going on.

I know this is an edge case and not impactful to me in any production way, so definitely not a high priority. However, it is now a very consistent, reproducible issue (at least on my end on different windows 10 computers running the latest version of FireFox).

Consistent issues are easier to pinpoint than random, intermittent ones.

And now it is not tied to my code at all and a similar form of the issue is showing in the final data grid tutorial application if you follow the notes above.

Hope this helps and is not too confusing.