fablabbcn / smartcitizen-web

The Smart Citizen Kit platform
https://smartcitizen.me
GNU Affero General Public License v3.0
13 stars 7 forks source link

Don't error if storing markers in localstorage throws an error #450

Closed timcowlishaw closed 7 months ago

timcowlishaw commented 7 months ago

The bug on some versions of safari was caused by this - for reasons unknown it was throwing a quota exceeded error when we go to cache the markers. The app appears to work without this in any case, so we just catch the error and log an informational message before carrying on, which fixes the safari issue.

timcowlishaw commented 7 months ago

Hmm, the tests are failing because an ancient dependency we rely on has gone from github :-/ I'm not quite sure how to deal with that!

oscgonfer commented 7 months ago

Hi!

Seems like the failing repo is backed up here: https://github.com/verastoyanova/bower-angular-spinner

I also did a fork in the fablabbcn just in case: https://github.com/fablabbcn/bower-angular-spinner

Could you test it @timcowlishaw ?

timcowlishaw commented 7 months ago

Hmm - that appears to install OK locally, but now when i do npm run dev and look at the local site i just get a blank screen and the following in the console:

Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
[$injector:nomod] Module 'app' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.

[https://errors.angularjs.org/1.7.9/$injector/modulerr?p0=app&p1=%5B%24injector%3Anomod%5D%20Module%20'app'%20is%20not%20available!%20You%20either%20misspelled%20the%20module%20name%20or%20forgot%20to%20load%20it.%20If%20registering%20a%20module%20ensure%20that%20you%20specify%20the%20dependencies%20as%20the%20second%20argument.%0Ahttps%3A%2F%2Ferrors.angularjs.org%2F1.7.9%2F%24injector%2Fnomod%3Fp0%3Dapp%0AminErr%2F%3C%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A138%3A12%0AsetupModuleLoader%2F%3C%2Fmodule%2F%3C%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A2310%3A17%0Aensure%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A2231%3A38%0Amodule%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A2308%3A14%0AcreateInjector%2FloadModules%2F%3C%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A5038%3A22%0AforEach%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A387%3A20%0AloadModules%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A5022%3A12%0AcreateInjector%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A4939%3A30%0AdoBootstrap%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A1962%3A34%0Abootstrap%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A1983%3A12%0AangularInit%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A1868%3A14%0A%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A36426%3A16%0Afire%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fjquery%2Fdist%2Fjquery.js%3A3099%3A30%0AfireWith%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fjquery%2Fdist%2Fjquery.js%3A3211%3A11%0Aready%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fjquery%2Fdist%2Fjquery.js%3A3417%3A13%0Acompleted%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fjquery%2Fdist%2Fjquery.js%3A3433%3A9%0A](https://errors.angularjs.org/1.7.9/$injector/modulerr?p0=app&p1=%5B%24injector%3Anomod%5D%20Module%20%27app%27%20is%20not%20available!%20You%20either%20misspelled%20the%20module%20name%20or%20forgot%20to%20load%20it.%20If%20registering%20a%20module%20ensure%20that%20you%20specify%20the%20dependencies%20as%20the%20second%20argument.%0Ahttps%3A%2F%2Ferrors.angularjs.org%2F1.7.9%2F%24injector%2Fnomod%3Fp0%3Dapp%0AminErr%2F%3C%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A138%3A12%0AsetupModuleLoader%2F%3C%2Fmodule%2F%3C%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A2310%3A17%0Aensure%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A2231%3A38%0Amodule%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A2308%3A14%0AcreateInjector%2FloadModules%2F%3C%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A5038%3A22%0AforEach%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A387%3A20%0AloadModules%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A5022%3A12%0AcreateInjector%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A4939%3A30%0AdoBootstrap%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A1962%3A34%0Abootstrap%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A1983%3A12%0AangularInit%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A1868%3A14%0A%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fangular%2Fangular.js%3A36426%3A16%0Afire%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fjquery%2Fdist%2Fjquery.js%3A3099%3A30%0AfireWith%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fjquery%2Fdist%2Fjquery.js%3A3211%3A11%0Aready%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fjquery%2Fdist%2Fjquery.js%3A3417%3A13%0Acompleted%40http%3A%2F%2Flocalhost%3A8080%2Fbower_components%2Fjquery%2Fdist%2Fjquery.js%3A3433%3A9%0A)
    Angular 9
    jQuery 4
oscgonfer commented 7 months ago

Hi @timcowlishaw same for me. I added the error in the catch directive and seems to fix it. Can you check on your end?

timcowlishaw commented 7 months ago

Aha, that's looking good to me. Thanks Óscar!