-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: webui not loading in firefox with cookies and localStorage disabled #2190
Comments
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
Finally, remember to use https://discuss.ipfs.io if you just need general support. |
Thanks for submitting this issue @ivan386 looks like an issue with the underlying https://github.com/i18next/i18next-localstorage-backend package. Did you also disable access to localstorage? the package uses |
@whizzzkid localstorage are blocked with cookie blocking. When i disable protection which allows cookie and localstorage it works fine. In first place you can wrap around line with localStorage in |
Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days. |
Thanks for the update @ivan386, I am still not sure if this can be entertained as a bug on ipfs-webui, how critical is using ipfs-webui with cookies disabled? Maybe, this: #2192 fixes your concern (based on: https://github.com/i18next/i18next-localstorage-backend/tree/e04dc1ff60e521e39caf13a875e7eb76d19fcd20?tab=readme-ov-file#cache-backend-options) However, I am not sure how the translation options behave in such scenario, the changes will definitely not persist but to counter that you can use |
@whizzzkid same errors
i18n.js:30 { // LocalStorageBackend
defaultVersion: version,
expirationTime: (!process.env.NODE_ENV || process.env.NODE_ENV === 'development') ? 1 : 7 * 24 * 60 * 60 * 1000,
store: typeof window !== 'undefined' && 'localStorage' in window ? window.localStorage : null /* error on this line */
}, money-clip.m.js:32 function createStore(dbName, storeName) {
const dbp = idbReady().then(() => {
const request = indexedDB.open(dbName); /* error on this line */
request.onupgradeneeded = () => request.result.createObjectStore(storeName);
return promisifyRequest(request);
});
return (txMode, callback) => dbp.then((db) => callback(db.transaction(storeName, txMode).objectStore(storeName)));
} localStorage exist in window
but if i try to get it
|
@ivan386 I updated #2192 to not load localStorage backend entirely. Please try once again: https://bafybeih4ludx4qgmotk44fjt66elhbnxnziknvhrbvkg3pvz4ira7rwwti.on.fleek.co/ |
@whizzzkid same errors
i18n.js: if (typeof window !== 'undefined' && 'localStorage' in window) {
i18nBackend = [LocalStorageBackend, ...i18nBackend]
i18nBackendOptions = [
{ // LocalStorageBackend
defaultVersion: version,
expirationTime: (!process.env.NODE_ENV || process.env.NODE_ENV === 'development') ? 1 : 7 * 24 * 60 * 60 * 1000,
store: typeof window !== 'undefined' && 'localStorage' in window ? window.localStorage : null /* error on this line */
},
...i18nBackendOptions
]
} money-clip.m.js: function createStore(dbName, storeName) {
const dbp = idbReady().then(() => {
const request = indexedDB.open(dbName); /* error on this line */
request.onupgradeneeded = () => request.result.createObjectStore(storeName);
return promisifyRequest(request);
});
return (txMode, callback) => dbp.then((db) => callback(db.transaction(storeName, txMode).objectStore(storeName)));
} maybe you can change part in i18n.js window.localStorage to (()=>{try{return window.localStorage}catch(e){}})() |
Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days. |
This issue was closed because it is missing author input. |
I can reproduce this error by explicitly setting However, I don't think we have the bandwidth to work around someone explicitly disabling functionality this app requires to function (translations, etc..) I would recommend adding an exception to allow If someone can figure out a way to support browsers where these functionalities are disabled without hindering functionality for more common usecases, I'm all for approving a PR. |
Describe the bug
I try to open webui and browser show me nothing.
My browser Firefox in private mod. All cookies disabled in settings. It is block access to local storage.
In console i see errors:
First error:
Error happen here in code (i18nextLocalStorageBackend.js:50):
Second error:
Error happen here in code (money-clip.m.js:32):
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Web UI is shown
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: