Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Handle path state on Explore unmount #11

Closed
viveknigam3003 opened this issue Sep 16, 2020 · 0 comments
Closed

Handle path state on Explore unmount #11

viveknigam3003 opened this issue Sep 16, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@viveknigam3003
Copy link
Contributor

Motivation

The path for Explorer is stored and accessed from the state tree which works fine when browsing the scoped namespace. BUT, the application does not handle unexpected unmount of the Explore tab component, which causes the app to crash.

Error Log:

Error: EIO: i/o error, stat '/ruciofs/rucio-server-x509/test/dataset3/rucio-server-x509'
[1]     at Object.statSync (fs.js:933:3)
[1]     at getFiles (/home/vivek/Desktop/GSoC_2020/desktop/server/APIs/files.js:23:10)
[1]     at /home/vivek/Desktop/GSoC_2020/desktop/server/routes/files.js:16:16
[1]     at Layer.handle [as handle_request] (/home/vivek/Desktop/GSoC_2020/desktop/node_modules/express/lib/router/layer.js:95:5)
[1]     at next (/home/vivek/Desktop/GSoC_2020/desktop/node_modules/express/lib/router/route.js:137:13)
[1]     at Route.dispatch (/home/vivek/Desktop/GSoC_2020/desktop/node_modules/express/lib/router/route.js:112:3)
[1]     at Layer.handle [as handle_request] (/home/vivek/Desktop/GSoC_2020/desktop/node_modules/express/lib/router/layer.js:95:5)
[1]     at /home/vivek/Desktop/GSoC_2020/desktop/node_modules/express/lib/router/index.js:281:22
[1]     at Function.process_params (/home/vivek/Desktop/GSoC_2020/desktop/node_modules/express/lib/router/index.js:335:12)
[1]     at next (/home/vivek/Desktop/GSoC_2020/desktop/node_modules/express/lib/router/index.js:275:10)

Modification

Fix the unmount handling by adding a cleaup effect for component unmount, and resets the path state on unmount.

Expected Results

  • The app handles unexpected clicking of any other tab.
  • Path state cleaned and reset on opening some other tab or selecting some other function.
@viveknigam3003 viveknigam3003 added the bug Something isn't working label Sep 16, 2020
@viveknigam3003 viveknigam3003 self-assigned this Sep 16, 2020
@bari12 bari12 closed this as completed Mar 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants