Error
Joplin encountered a fatal error and could not continue. To report the error, please copy the entire content of this page and post it on Joplin forum or GitHub.
Message
Cannot read property 'indexOf' of undefined
Revision: 11b8821bf (master)
Stack trace
TypeError: Cannot read property 'indexOf' of undefined
at MainScreenComponent.resizableLayout_renderItem (C:\Program Files\Joplin\resources\app.asar\gui\MainScreen\MainScreen.js:475:17)
at renderLayoutItem (C:\Program Files\Joplin\resources\app.asar\gui\ResizableLayout\ResizableLayout.js:89:32)
at renderLayoutItem (C:\Program Files\Joplin\resources\app.asar\gui\ResizableLayout\ResizableLayout.js:102:41)
at ResizableLayout (C:\Program Files\Joplin\resources\app.asar\gui\ResizableLayout\ResizableLayout.js:117:22)
at renderWithHooks (C:\Program Files\Joplin\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:15108:18)
at updateFunctionComponent (C:\Program Files\Joplin\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:16925:20)
at beginWork$1 (C:\Program Files\Joplin\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:18498:16)
at HTMLUnknownElement.callCallback (C:\Program Files\Joplin\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:347:14)
at Object.invokeGuardedCallbackDev (C:\Program Files\Joplin\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:397:16)
at invokeGuardedCallback (C:\Program Files\Joplin\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:454:31)
Component stack
in ResizableLayout (created by MainScreenComponent)
in div (created by MainScreenComponent)
in MainScreenComponent (created by Connect(MainScreenComponent))
in Connect(MainScreenComponent) (created by NavigatorComponent)
in div (created by NavigatorComponent)
in NavigatorComponent (created by Connect(NavigatorComponent))
in Connect(NavigatorComponent) (created by RootComponent)
in ThemeProvider (created by RootComponent)
in StyleSheetManager (created by RootComponent)
in RootComponent (created by Connect(RootComponent))
in Connect(RootComponent)
in ErrorBoundary
in Provider
It happens in th following situation:
The notebooks panel was on the very left
To its right the outline panel
To its right the Notes panel
When I tried the move the Notes panel to the left it crashes and give this error
I tried later moving the outline panel to the right insted (to have the same arrangement, i.e. Notes and outlin one on top of the other) it worked fine.
Normally an ID should be provided so that the app can know what panel corresponds to what plugin across restart. Currently it if doesn't the app should set a default ID, but for some reason it's not happening here.
I'm going to fix it anyway so that the app doesn't crash when the ID is undefined, but you might want to set an ID as the function call without an ID will stop working from the next version.
Thanks for your prompt response Laurent.
to replicate the issue
install favorites, note tabs, outline plugins
Deactivate outline and restart
Reactivate outline
go to view->change application layout. Here outline should appear on the far right side
move it to the left
once it reaches the before last place, i.e. between notes panle and notebooks panel, move the notes to the left.
it crashes.
Now, regarding the ID and function thing.
I'm not a programmer, so forgive me but I have no idea what you are talking about or how to do it. Would that mean that the whole app might not work for me from the next version?
I did not reproduce your problem, but I followed laurent's suggestion and modified the deprecated method and added id to the panel. Try 1.0.11.Thanks for your feedback.
@osman, is the bug still happening for you? If so, could you try with the latest version please? Release v1.7.10 · laurent22/joplin · GitHub When doing so please open the dev tools first (from the Help menu), then try to replicate the same steps to cause the crash.
Normally with this version it shouldn't crash, but it should display an error in the console, perhaps providing more info as to why it's happening. If you manage to get this error message, please could you post it here?