june07/NiM

Problem to start the extension

oweitman opened this issue · 7 comments

problem remains also after uninstall and reinstall of the extension
Workaround: in chrome developer console goto Application, right click on local storage and clear.

Uncaught (in promise) TypeError: Cannot assign to read only property 'length' of object '#'
at SettingsStorage.setPreference [as _setCallback] (host.js:106)
at SettingsStorage.set (common.js:330)
at VersionController._migrateSettingsFromLocalStorage (common.js:429)
at VersionController._updateVersionFrom11To12 (common.js:396)
at VersionController.updateVersion (common.js:366)
at MainImpl._createSettings (main.js:37)
at MainImpl._gotPreferences (main.js:34)
at InspectorFrontendHostStub.getPreferences (host.js:105)
at MainImpl._loaded (main.js:32)

So after the workaround, you no longer experience the problem?

Ehm no. That is why i Call it workaround. But i loose all the Settings of the developer console.

Further a screen recording always helps.

OS: Microsoft Windows [Version 10.0.18362.836]
NiM: 2.4.2
Node: v10.20.1 (i think this doesnt matter, because the error is in the startup phase of nim
screencast ist not possible anymore, because after workaround the error doesnt come up.
before the workaround ther is only an empty screen after start of NiM

maybe the cause of this issue isnt NiM. Maybe it can be Chrome Dev tools
see also
eclipsesource/tabris-js#2069

the problem is, that the routine want to migrate the property 'length' from localStorage to localSetting (array) that is not writable.

    _migrateSettingsFromLocalStorage: function() 
    {
        var localSettings = ["advancedSearchConfig", "breakpoints", "consoleHistory", "domBreakpoints", "eventListenerBreakpoints", "fileSystemMapping", "lastSelectedSourcesSidebarPaneTab", "previouslyViewedFiles", "savedURLs", "watchExpressions", "workspaceExcludedFolders", "xhrBreakpoints"].keySet();
        if (!window.localStorage)
            return;
        for (var key in window.localStorage) {
            if (key in localSettings)
                continue;var value = window.localStorage[key];
            window.localStorage.removeItem(key);
            WebInspector.settings._settingsStorage[key] = value;
        }
    },
    _clearBreakpointsWhenTooMany: function(breakpointsSetting, maxBreakpointsCount) 
    {
        if (breakpointsSetting.get().length > maxBreakpointsCount)
            breakpointsSetting.set([]);
    }
}

This certainly does not seem like a NiM issue based solely on the stack trace. Also want to bring out this current Chromium bug: https://blog.june07.com/chromium-bug-900945/ which sounded somewhat similar in nature.

fehler ist nicht mehr aufgetreten. fehler lag wohl auch eher mehr an chrome selbst, da er nach einem update aufgetreten ist.issue closed