vegegoku opened a new issue #14442:
URL: https://github.com/apache/superset/issues/14442


   A clear and concise description of what the bug is.
   Setting up a public dashboard does not work and fails on the 
findPermission.ts file due to JS error for undefined roles object passed as an 
argument.
   
   ### Expected results
   
   A dashboard to open and without user login.
   
   ### Actual results
   
   JavaScript error and dashboard fails to load
   
   #### Screenshots
   
   
![superset](https://user-images.githubusercontent.com/5379625/116806884-9c13e580-ab38-11eb-9ffe-209e32fa5e85.png)
   
   
   #### How to reproduce the bug
   
   1. Clone the repository locally
   2. Add the following to the `superset_config.py` `PUBLIC_ROLE_LIKE = "Admin"`
   3. Start superset using `docker-compose up`
   4. Log in as admin and edit the public roles to have all required 
permissions for one of the dashboards.
   5. Log-out or in a private browser window try to open the public dashboard.
   
   ### Environment
   
   - superset version: `Version: 0.999.0dev`
   - python version: `Python 2.7.18`
   - node.js version: `v12.18.2`
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included 
it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version 
of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't 
found one similar.
   
   ### Additional context
   
   Browser stack trace
   
   ```
   findPermission.ts?060b:23 Uncaught TypeError: Cannot convert undefined or 
null to object
       at values (<anonymous>)
       at eval (findPermission.ts?060b:23)
       at memoized (memoize-one.esm.js?5b0a:27)
       at eval (hydrate.js?ab55:354)
       at eval (index.js?b083:8)
       at eval (DashboardPage.tsx?a8fc:59)
       at commitHookEffectListMount (VM22770 react-dom.development.js:19765)
       at commitPassiveHookEffects (VM22770 react-dom.development.js:19803)
       at HTMLUnknownElement.callCallback (VM22770 react-dom.development.js:189)
       at Object.invokeGuardedCallbackDev (VM22770 react-dom.development.js:238)
   eval @ findPermission.ts?060b:23
   memoized @ memoize-one.esm.js?5b0a:27
   eval @ hydrate.js?ab55:354
   eval @ index.js?b083:8
   eval @ DashboardPage.tsx?a8fc:59
   commitHookEffectListMount @ react-dom.development.js?7f13:19765
   commitPassiveHookEffects @ react-dom.development.js?7f13:19803
   callCallback @ react-dom.development.js?7f13:189
   invokeGuardedCallbackDev @ react-dom.development.js?7f13:238
   invokeGuardedCallback @ react-dom.development.js?7f13:293
   flushPassiveEffectsImpl @ react-dom.development.js?7f13:22885
   unstable_runWithPriority @ scheduler.development.js?b589:653
   runWithPriority$1 @ react-dom.development.js?7f13:11062
   flushPassiveEffects @ react-dom.development.js?7f13:22852
   eval @ react-dom.development.js?7f13:22731
   workLoop @ scheduler.development.js?b589:597
   flushWork @ scheduler.development.js?b589:552
   performWorkUntilDeadline @ scheduler.development.js?b589:164
   react-dom.development.js?7f13:19561 The above error occurred in the 
<DashboardPage> component:
       in DashboardPage (created by DashboardPageWithErrorBoundary)
       in ErrorBoundary (created by DashboardPageWithErrorBoundary)
       in DashboardPageWithErrorBoundary (created by App)
       in DynamicPluginProvider (created by App)
       in ThemeProvider (created by App)
       in Unknown (created by App)
       in Provider (created by App)
       in App
       in AppContainer
       in Unknown
   
   React will try to recreate this component tree from scratch using the error 
boundary you provided, ErrorBoundary.
   logCapturedError @ react-dom.development.js?7f13:19561
   logError @ react-dom.development.js?7f13:19598
   callback @ react-dom.development.js?7f13:20778
   callCallback @ react-dom.development.js?7f13:12513
   commitUpdateQueue @ react-dom.development.js?7f13:12534
   commitLifeCycles @ react-dom.development.js?7f13:19892
   commitLayoutEffects @ react-dom.development.js?7f13:22835
   callCallback @ react-dom.development.js?7f13:189
   invokeGuardedCallbackDev @ react-dom.development.js?7f13:238
   invokeGuardedCallback @ react-dom.development.js?7f13:293
   commitRootImpl @ react-dom.development.js?7f13:22573
   unstable_runWithPriority @ scheduler.development.js?b589:653
   runWithPriority$1 @ react-dom.development.js?7f13:11062
   commitRoot @ react-dom.development.js?7f13:22413
   finishSyncRender @ react-dom.development.js?7f13:21839
   performSyncWorkOnRoot @ react-dom.development.js?7f13:21825
   eval @ react-dom.development.js?7f13:11112
   unstable_runWithPriority @ scheduler.development.js?b589:653
   runWithPriority$1 @ react-dom.development.js?7f13:11062
   flushSyncCallbackQueueImpl @ react-dom.development.js?7f13:11107
   flushSyncCallbackQueue @ react-dom.development.js?7f13:11095
   flushPassiveEffectsImpl @ react-dom.development.js?7f13:22915
   unstable_runWithPriority @ scheduler.development.js?b589:653
   runWithPriority$1 @ react-dom.development.js?7f13:11062
   flushPassiveEffects @ react-dom.development.js?7f13:22852
   eval @ react-dom.development.js?7f13:22731
   workLoop @ scheduler.development.js?b589:597
   flushWork @ scheduler.development.js?b589:552
   performWorkUntilDeadline @ scheduler.development.js?b589:164
   
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to