| Summary: | TypeError running workspace search | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Michael Rennie <Michael_Rennie> |
| Component: | Node | Assignee: | XinYi Jiang <xinyij> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | critical | ||
| Priority: | P2 | CC: | xinyij |
| Version: | 15.0 | ||
| Target Milestone: | 16.0 | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| See Also: | https://github.com/eclipse/orion.client/pull/195 | ||
| Whiteboard: | |||
GitHub Pull Request 195 created by [soulbeing] https://github.com/eclipse/orion.client/pull/195 Related, bug 521708, which changed the shape of the workspace arrays. Merged. |
I tried to perform a search with no project context (Ctrl+Shift+F witg hno project selected and got the following: [2017-09-21 09:42:57.280] [ERROR] response - /filesearch?sort=NameLower%20asc&rows=100&start=0&q=NameLower:app.js*+Location:/file* TypeError: Cannot read property 'lastIndexOf' of undefined at Object.module.exports.decodeUserIdFromWorkspaceId (/Users/mrennie/git/orion.client/modules/orionode/lib/metastore/util/metaUtil.js:21:25) at FsMetastore.getWorkspaceDir (/Users/mrennie/git/orion.client/modules/orionode/lib/metastore/fs/store.js:338:26) at /Users/mrennie/git/orion.client/modules/orionode/lib/search.js:150:22 at Array.map (native) at /Users/mrennie/git/orion.client/modules/orionode/lib/search.js:149:49 at Layer.handle [as handle_request] (/Users/mrennie/git/orion.client/modules/orionode/node_modules/express/lib/router/layer.js:95:5) at next (/Users/mrennie/git/orion.client/modules/orionode/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/Users/mrennie/git/orion.client/modules/orionode/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/Users/mrennie/git/orion.client/modules/orionode/node_modules/express/lib/router/layer.js:95:5) at /Users/mrennie/git/orion.client/modules/orionode/node_modules/express/lib/router/index.js:281:22 at param (/Users/mrennie/git/orion.client/modules/orionode/node_modules/express/lib/router/index.js:354:14) at param (/Users/mrennie/git/orion.client/modules/orionode/node_modules/express/lib/router/index.js:365:14) at Function.process_params (/Users/mrennie/git/orion.client/modules/orionode/node_modules/express/lib/router/index.js:410:3) at next (/Users/mrennie/git/orion.client/modules/orionode/node_modules/express/lib/router/index.js:275:10) at Function.handle (/Users/mrennie/git/orion.client/modules/orionode/node_modules/express/lib/router/index.js:174:3) at router (/Users/mrennie/git/orion.client/modules/orionode/node_modules/express/lib/router/index.js:47:12) It appears like req.user.workspaces is holding an array of workspace names when it gets into the search code, as opposed to an array of workspace metadata objects like it expects...