I have a functioning react application that I've been running in Chrome and Edge (mainly). I store various information in local storage. The application is working as expected, but for some reason, I've lost the ability to view the local storage variables in Edge (developer tools). They are there, because the application is working fine; I just can't see them. In Chrome I can see them fine. They were visible in Edge until I started my latest sprint. I unwound all the changes, but they are still not showing. I've tried clearing all the browser data, rebooting, etc.
Has anyone else encountered such an issue? I am just looking for some ideas of how to investigate the issue, because my current enquiries have not been successful.
Thanks in advance.
Related
My understanding of sessionStorage is that it should be cleared when the session ends (browser/tab is closed, user navigates away, that kinda thing). Which is the desired behaviour.
However, in Chrome (the target browser) it isnt cleared on any of these events but seems to persist a la localStorage.
Any ideas why? I am wondering if its some weird setting in chrome where I sync from desktop to laptop or something?
Other than cookies, any way to solve this for a specific domain/application?
In case it changes anything
sessionStorage is accessed through a WebStorage
We are using ReactJS
latest version of Chrome available for Mac M1
Background:
So. I'm currently working on a Firefox extension, and I've been testing it using web-ext, which clears the data on close. The extension has functionality across restarts, and in order to make sure it works I'd have to be able to have persistent local storage across restarts.
To test this:
I made a testing profile and ran the --firefox-profile argument. The extension runs normally with the argument, but the storage doesn't carry over since web-ext makes a temp copy of the specified profile.
This is where the --keep-profile-changes argument comes in. However, when I ran it (web-ext run --firefox-profile "[profile-directory]" --keep-profile-changes --browser-console) the extension button on the toolbar would continually disappear and reappear. Whatever was messing up the extension was also throwing lots of "sendRemoveListener on closed conduit" errors in the browser console.
Possible cause:
While looking for a solution, I found this Bugzilla report mentioning that browser.contextMenus.onClicked.addListener() (which I use in my extension) can cause that error to get thrown, but I can't seem to find a solution.
If parts of my code are needed to figure out how to fix this, let me know and I can edit the question to include it.
I'm growing frustrated with the whole mix of Spring Tool Suite, Tomcat and Chrome. I'm working on a website's back end and I'm having all sorts of troubles getting my webpage to reload properly when I make changes to the JavaScript. I've made a fix to a problem in my code and when I go to preview, the error is still there. When I inspect the JavaScript in the Chrome Dev Tools, I see that it is still loading the JavaScript before I made the change, despite me having saved the file. I've rebooted Tomcat, I've been using Incognito mode, I've been deleting my cache and yet even in incognito, Chrome won't dump the old JavaScript file for the new one.
It's getting frustrating, because I waste time with every change I make with the JavaScript trying to wrestle with Chrome and Tomcat to get my webpage to use the most recent saved version of my JavaScript. I don't know if this matters, but I'm not writing my JavaScript in STS with Tomcat and my Java code, but it is in the same folder as my project and when I open it in STS, it always has my most recent save changes anyways.
Is there any fix to this?
I use Sentry to track the error in my website. The problem is sometimes chrome mobile for android has a null localStorage that cause all related method such as getItem or setItem will produce an error (Yeah, it's flaky). Have you ever got the problem like this before? I'd like to know the best solution for this problem.
Thanks :)
Maybe it is because this question is almost 2 years old and they've changed things but localStorage definitely works in Android Chrome with localStorage.setItem() and getItem() calls.
There is no need for the polyfill.
However, there is a problem / challenge that occurs if you've already put a page out there and you add localStorage that is related to Chrome Caching behavior. That's the problem I was having.
I had a page on the web than did some things via JavaScript. Then I added the simple localStorage calls to write and read a string value. I found that localStorage would fail.
Finally I loaded the .js file directly in my Android chrome browser and saw that the JS was the cached version of the file.
I reloaded the JS file and saw it update in Android Chrome so I went back to the page that uses the JS file and it still didn't save to localStorage.
To get it to work I had to close Android Chrome entirely (after refreshing the JS file) and finally localStorage did indeed work.
Here's a plunkr where you can point your mobile device at and save a value in localStorage to prove to yourself that it works.
http://plnkr.co/edit/dWgfh5WuMcM3InR0OaN4?p=info
Type in a screen name and press the Save button:
Then you can Stop and Run the plunkr again and you'll see that your Screen Name has been saved to localStorage and read out of localStorage to populate the top message:
I've actually tested this on various versions of Android, iOS (on an iPad) and in various desktop browsers and it works in every case.
Here's the code that calls localStorage.setItem()
function writeScreeNameToStorage(screenName){
var encodedScreenName = getEncodedValue(screenName);
localStorage.setItem("screenName", encodedScreenName);
}
I am creating an application that runs in chromium portable in full screen with the --kiosk flag. It is written in HTML, JavaScript, and CSS. I am also using the HTML5 File System to store some large sets of data. The application opens up in full screen, and the info bar to request permanent storage pops up.
The problem is that, while running in kiosk mode, you cannot select either "OK" or "Cancel" to the file system's request to store data. You can only close the info bar with the "X". This results in the file system not getting any kind of quota and the application fails.
So is there a way to have unlimited storage for an application running from "file:///"? I have tried using --unlimited-storage but it doesn't seem to work for a webpage.
Is there a way to open up in full screen without using --kiosk? Any other work arounds or suggestions are welcome.
What version of Chromium Portable are you using? I had a similar issue awhile back, but I don't have the same problem in the newer versions. I am using the latest version as of now which is Chromium Portable 30.0.1599.10 (released on 2013-08-21).