Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LookerSDKError with local CloudFunction configuration #71

Open
goldfix opened this issue Aug 6, 2024 · 3 comments
Open

LookerSDKError with local CloudFunction configuration #71

goldfix opened this issue Aug 6, 2024 · 3 comments

Comments

@goldfix
Copy link

goldfix commented Aug 6, 2024

Hi,

I'm trying to configure Looker Explore using a local configuration for:

  • explore-assistant-cloud-function
  • explore-assistant-extension

The application returns this error:

Error Name:
LookerSDKError

Error Message:
Request failed:

<!-- @@@@@@@@@@@@@ FAVICONS @@@@@@@@@@@@@ -->

<link rel="apple-touch-icon-precomposed" sizes="57x57" href="https://wwwstatic-b.lookercdn.com/favicon/apple-touch-icon-57x57.png" />
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="https://wwwstatic-c.lookercdn.com/favicon/apple-touch-icon-114x114.png" />
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="https://wwwstatic-d.lookercdn.com/favicon/apple-touch-icon-72x72.png" />
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="https://wwwstatic-a.lookercdn.com/favicon/apple-touch-icon-144x144.png" />
<link rel="apple-touch-icon-precomposed" sizes="60x60" href="https://wwwstatic-b.lookercdn.com/favicon/apple-touch-icon-60x60.png" />
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="https://wwwstatic-c.lookercdn.com/favicon/apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="https://wwwstatic-d.lookercdn.com/favicon/apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="https://wwwstatic-a.lookercdn.com/favicon/apple-touch-icon-152x152.png" />
<link rel="icon" type="image/png" href="https://wwwstatic-b.lookercdn.com/favicon/favicon-196x196.png" sizes="196x196" />
<link rel="icon" type="image/png" href="https://wwwstatic-c.lookercdn.com/favicon/favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/png" href="https://wwwstatic-d.lookercdn.com/favicon/favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="https://wwwstatic-a.lookercdn.com/favicon/favicon-16x16.png" sizes="16x16" />
<link rel="icon" type="image/png" href="https://wwwstatic-b.lookercdn.com/favicon/favicon-128.png" sizes="128x128" />
<meta name="application-name" content="Looker"/>
<meta name="msapplication-TileColor" content="#FFFFFF" />
<meta name="msapplication-TileImage" content="https://wwwstatic-c.lookercdn.com/favicon/mstile-144x144.png" />
<meta name="msapplication-square70x70logo" content="https://wwwstatic-d.lookercdn.com/favicon/mstile-70x70.png" />
<meta name="msapplication-square150x150logo" content="https://wwwstatic-a.lookercdn.com/favicon/mstile-150x150.png" />
<meta name="msapplication-wide310x150logo" content="https://wwwstatic-b.lookercdn.com/favicon/mstile-310x150.png" />
<meta name="msapplication-square310x310logo" content="https://wwwstatic-c.lookercdn.com/favicon/mstile-310x310.png" />

<style type="text/css">
    body {
        background-color: #2e343f;
        color: white;
        height: auto;
        font-family: Open Sans, Helvetica, Arial, sans-serif;
    }
    .message {
        width: 100%;
        max-width: 760px;
        margin: 0 auto;
        margin-top: 135px;
        text-align: center;
    }
    h2, h3 {
        font-weight: normal;
    }
    a {
        color: white;
    }
</style>
<div class="message">

    <img width="210" height="84" src="https://wwwstatic-a.lookercdn.com/logos/looker_all_white.svg" alt="Looker">

    <h1>Looker is unavailable.</h1>

    <h2>If you typed in a URL, double-check the spelling.</h2>
    <h2>This may also be due to a temporary condition such as an outage, <a href="https://docs.looker.com/relnotes/hosted-maintenance-hours">scheduled maintenance</a> or upgrade.</h2>
    <br>
    <h3>
      If this message persists or you have any concerns, <br> contact us from
      <a href="https://help.looker.com">help.looker.com</a> and we'll respond promptly.
    </h3>

</div>

Diagnosis:
The error is likely related to your Look specific .env variables.

Troubleshooting Steps
Check the LOOKML_MODEL & LOOKML_EXPLORE env variables for your extension. Are they valid (spelling) & exist in your Looker instance?

Make sure your user has access to this model and explore. At the very least with see_lookml permissions.

Check the Connection environment variables. Do valid BQ connections by those names exist in your Looker instance?


  • I verified LOOKML_MODEL and LOOKML_EXPLORE and are correct. In this moment I'm using an admin role.
  • The connection to BQ is correctly configured (from Looker I can access to tables hosted in a dedicated dataset).
  • Load into BigQuery table sample using your explore-assistant-examples:
python load_examples.py --project_id test-sandbx-connection-000001 --explore_id MY_MODEL_NAME:MY_EXPLORE_NAME --dataset_id explore_assistant --table_id explore_assistant_examples --json_file examples.json
python load_examples.py --project_id test-sandbx-connection-000001 --explore_id MY_MODEL_NAME:MY_EXPLORE_NAME --dataset_id explore_assistant --table_id explore_assistant_refinement_examples --json_file refinement_examples.json

These are my configuration:

.env file:

LOOKER_MODEL=MY_MODEL_NAME
LOOKER_EXPLORE=MY_EXPLORE_NAME
VERTEX_AI_ENDPOINT=http://127.0.0.1:8000
VERTEX_CF_AUTH_TOKEN=2DOXz [. . .] ews5c=
VERTEX_BIGQUERY_LOOKER_CONNECTION_NAME=test-sandbx-connection

manifest.lkml file:

project_name: "xxx"

application: explore_assistant {
  label: "Explore Assistant"
  url: "https://localhost:8080/bundle.js"
  # file: "bundle.js"
  entitlements: {
    core_api_methods: ["lookml_model_explore","create_sql_query","run_sql_query","run_query","create_query"]
    navigation: yes
    use_embeds: yes
    use_iframes: yes
    new_window: yes
    new_window_external_urls: ["https://developers.generativeai.google/*"]
    local_storage: yes
    external_api_urls: ["http://127.0.0.1:8000"]
  }
}

@goldfix
Copy link
Author

goldfix commented Aug 6, 2024

Other errors from browser console:

       POST https://xxx.cloud.looker.com/api/internal/core/4.0/sql_queries 404 (Not Found)
       
LookerSDKError: Request failed: <!DOCTYPE html>
<html>
<head>
    <title>Looker Not Found (404)</title>
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600' rel='stylesheet' type='text/css'>

    <!-- @@@@@@@@@@@@@ FAVICONS @@@@@@@@@@@@@ -->

    <link rel="apple-touch-icon-precomposed" sizes="57x57" href="https://wwwstatic-b.lookercdn.com/favicon/apple-touch-icon-57x57.png" />
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="https://wwwstatic-c.lookercdn.com/favicon/apple-touch-icon-114x114.png" />
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="https://wwwstatic-d.lookercdn.com/favicon/apple-touch-icon-72x72.png" />
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="https://wwwstatic-a.lookercdn.com/favicon/apple-touch-icon-144x144.png" />
    <link rel="apple-touch-icon-precomposed" sizes="60x60" href="https://wwwstatic-b.lookercdn.com/favicon/apple-touch-icon-60x60.png" />
    <link rel="apple-touch-icon-precomposed" sizes="120x120" href="https://wwwstatic-c.lookercdn.com/favicon/apple-touch-icon-120x120.png" />
    <link rel="apple-touch-icon-precomposed" sizes="76x76" href="https://wwwstatic-d.lookercdn.com/favicon/apple-touch-icon-76x76.png" />
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="https://wwwstatic-a.lookercdn.com/favicon/apple-touch-icon-152x152.png" />
    <link rel="icon" type="image/png" href="https://wwwstatic-b.lookercdn.com/favicon/favicon-196x196.png" sizes="196x196" />
    <link rel="icon" type="image/png" href="https://wwwstatic-c.lookercdn.com/favicon/favicon-96x96.png" sizes="96x96" />
    <link rel="icon" type="image/png" href="https://wwwstatic-d.lookercdn.com/favicon/favicon-32x32.png" sizes="32x32" />
    <link rel="icon" type="image/png" href="https://wwwstatic-a.lookercdn.com/favicon/favicon-16x16.png" sizes="16x16" />
    <link rel="icon" type="image/png" href="https://wwwstatic-b.lookercdn.com/favicon/favicon-128.png" sizes="128x128" />
    <meta name="application-name" content="Looker"/>
    <meta name="msapplication-TileColor" content="#FFFFFF" />
    <meta name="msapplication-TileImage" content="https://wwwstatic-c.lookercdn.com/favicon/mstile-144x144.png" />
    <meta name="msapplication-square70x70logo" content="https://wwwstatic-d.lookercdn.com/favicon/mstile-70x70.png" />
    <meta name="msapplication-square150x150logo" content="https://wwwstatic-a.lookercdn.com/favicon/mstile-150x150.png" />
    <meta name="msapplication-wide310x150logo" content="https://wwwstatic-b.lookercdn.com/favicon/mstile-310x150.png" />
    <meta name="msapplication-square310x310logo" content="https://wwwstatic-c.lookercdn.com/favicon/mstile-310x310.png" />

    <style type="text/css">
        body {
            background-color: #2e343f;
            color: white;
            height: auto;
            font-family: Open Sans, Helvetica, Arial, sans-serif;
        }
        .message {
            width: 100%;
            max-width: 760px;
            margin: 0 auto;
            margin-top: 135px;
            text-align: center;
        }
        h2, h3 {
            font-weight: normal;
        }
        a {
            color: white;
        }
    </style>
</head>
<body>

    <div class="message">

        <img width="210" height="84" src="https://wwwstatic-a.lookercdn.com/logos/looker_all_white.svg" alt="Looker">

        <h1>Looker is unavailable.</h1>

        <h2>If you typed in a URL, double-check the spelling.</h2>
        <h2>This may also be due to a temporary condition such as an outage, <a href="https://docs.looker.com/relnotes/hosted-maintenance-hours">scheduled maintenance</a> or upgrade.</h2>
        <br>
        <h3>
          If this message persists or you have any concerns, <br> contact us from
          <a href="https://help.looker.com">help.looker.com</a> and we'll respond promptly.
        </h3>

    </div>

</body>
</html>

    at new LookerSDKError (lookerSDKError.js:26:1)
    at sdkError (transport.js:194:1)
    at transport.js:220:1
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (transport.js:21:1)
    at _next (transport.js:22:1)

useBigQueryExamples.ts:42 The above error occurred in the <ExploreApp> component:

    at ExploreApp (https://localhost:8080/bundle.js:35:74)
    at AppContainer (eval at ES6ProxyComponentFactory (https://localhost:8080/bundle.js:110394:10), <anonymous>:14:7)
    at HotExportedExploreApp (eval at ES6ProxyComponentFactory (https://localhost:8080/bundle.js:110394:10), <anonymous>:14:7)
    at ErrorBoundary (eval at ES6ProxyComponentFactory (https://localhost:8080/bundle.js:110394:10), <anonymous>:14:7)
    at TrapStackProvider (https://localhost:8080/bundle.js:10758:3)
    at ScrollLockProvider
    at TrapStackProvider (https://localhost:8080/bundle.js:10758:3)
    at FocusTrapProvider
    at div
    at P (https://localhost:8080/bundle.js:124971:19658)
    at Le (https://localhost:8080/bundle.js:124971:17336)
    at ThemeProvider (https://localhost:8080/bundle.js:10729:3)
    at HelmetProvider (eval at ES6ProxyComponentFactory (https://localhost:8080/bundle.js:110394:10), <anonymous>:14:7)
    at ComponentsProvider (https://localhost:8080/bundle.js:10188:7)
    at Router (eval at ES6ProxyComponentFactory (https://localhost:8080/bundle.js:110394:10), <anonymous>:14:7)
    at MemoryRouter (eval at ES6ProxyComponentFactory (https://localhost:8080/bundle.js:110394:10), <anonymous>:14:7)
    at ExtensionConnector (https://localhost:8080/bundle.js:20891:5)
    at ExtensionProvider (https://localhost:8080/bundle.js:21032:7)
    at PersistGate (eval at ES6ProxyComponentFactory (https://localhost:8080/bundle.js:110394:10), <anonymous>:14:7)
    at Provider (https://localhost:8080/bundle.js:114221:3)

React will try to recreate this component tree from scratch using the error boundary you provided, AppContainer.
    

useBigQueryExamples.ts:42 The above error occurred in the <AppContainer> component:

    at AppContainer (eval at ES6ProxyComponentFactory (https://localhost:8080/bundle.js:110394:10), <anonymous>:14:7)
    at HotExportedExploreApp (eval at ES6ProxyComponentFactory (https://localhost:8080/bundle.js:110394:10), <anonymous>:14:7)
    at ErrorBoundary (eval at ES6ProxyComponentFactory (https://localhost:8080/bundle.js:110394:10), <anonymous>:14:7)
    at TrapStackProvider (https://localhost:8080/bundle.js:10758:3)
    at ScrollLockProvider
    at TrapStackProvider (https://localhost:8080/bundle.js:10758:3)
    at FocusTrapProvider
    at div
    at P (https://localhost:8080/bundle.js:124971:19658)
    at Le (https://localhost:8080/bundle.js:124971:17336)
    at ThemeProvider (https://localhost:8080/bundle.js:10729:3)
    at HelmetProvider (eval at ES6ProxyComponentFactory (https://localhost:8080/bundle.js:110394:10), <anonymous>:14:7)
    at ComponentsProvider (https://localhost:8080/bundle.js:10188:7)
    at Router (eval at ES6ProxyComponentFactory (https://localhost:8080/bundle.js:110394:10), <anonymous>:14:7)
    at MemoryRouter (eval at ES6ProxyComponentFactory (https://localhost:8080/bundle.js:110394:10), <anonymous>:14:7)
    at ExtensionConnector (https://localhost:8080/bundle.js:20891:5)
    at ExtensionProvider (https://localhost:8080/bundle.js:21032:7)
    at PersistGate (eval at ES6ProxyComponentFactory (https://localhost:8080/bundle.js:110394:10), <anonymous>:14:7)
    at Provider (https://localhost:8080/bundle.js:114221:3)

React will try to recreate this component tree from scratch using the error boundary you provided, ErrorBoundary.
logCapturedError @ react-dom.development.js:20086
update.payload @ react-dom.development.js:20134
getStateFromUpdate @ react-dom.development.js:12103
processUpdateQueue @ react-dom.development.js:12251
updateClassInstance @ react-dom.development.js:13014
updateClassComponent @ react-dom.development.js:17433
beginWork @ react-dom.development.js:19074
beginWork$1 @ react-dom.development.js:23941
performUnitOfWork @ react-dom.development.js:22780
workLoopSync @ react-dom.development.js:22708
renderRootSync @ react-dom.development.js:22671
performSyncWorkOnRoot @ react-dom.development.js:22294
(anonymous) @ react-dom.development.js:11328
unstable_runWithPriority @ scheduler.development.js:468
runWithPriority$1 @ react-dom.development.js:11277
flushSyncCallbackQueueImpl @ react-dom.development.js:11323
flushSyncCallbackQueue @ react-dom.development.js:11310
scheduleUpdateOnFiber @ react-dom.development.js:21894
dispatchAction @ react-dom.development.js:16140
showBoundary @ react-error-boundary.development.esm.js:131
(anonymous) @ useBigQueryExamples.ts:42
asyncGeneratorStep @ asyncToGenerator.js:3
_throw @ asyncToGenerator.js:25
Promise.then
asyncGeneratorStep @ asyncToGenerator.js:12
_next @ asyncToGenerator.js:22
(anonymous) @ asyncToGenerator.js:27
(anonymous) @ asyncToGenerator.js:19
runExampleQuery @ useBigQueryExamples.ts:24
(anonymous) @ useBigQueryExamples.ts:55
asyncGeneratorStep @ asyncToGenerator.js:3
_next @ asyncToGenerator.js:22
(anonymous) @ asyncToGenerator.js:27
(anonymous) @ asyncToGenerator.js:19
getExamplePrompts @ useBigQueryExamples.ts:47
(anonymous) @ useBigQueryExamples.ts:77
invokePassiveEffectCreate @ react-dom.development.js:23488
callCallback @ react-dom.development.js:3946
invokeGuardedCallbackDev @ react-dom.development.js:3995
invokeGuardedCallback @ react-dom.development.js:4057
flushPassiveEffectsImpl @ react-dom.development.js:23575
unstable_runWithPriority @ scheduler.development.js:468
runWithPriority$1 @ react-dom.development.js:11277
flushPassiveEffects @ react-dom.development.js:23448
(anonymous) @ react-dom.development.js:23325
workLoop @ scheduler.development.js:417
flushWork @ scheduler.development.js:390
performWorkUntilDeadline @ scheduler.development.js:157
Show 42 more frames
Show less
useBigQueryExamples.ts:42 Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>.
    at div
    at MarkdownText (https://localhost:8080/bundle.js:312:5)
    at p
    at div
    at div
    at div
    at div
    at Fallback (https://localhost:8080/bundle.js:591:5)
    at ErrorBoundary (eval at ES6ProxyComponentFactory (https://localhost:8080/bundle.js:110394:10), <anonymous>:14:7)
    at TrapStackProvider (https://localhost:8080/bundle.js:10758:3)
    at ScrollLockProvider
    at TrapStackProvider (https://localhost:8080/bundle.js:10758:3)
    at FocusTrapProvider
    at div
    at P (https://localhost:8080/bundle.js:124971:19658)
    at Le (https://localhost:8080/bundle.js:124971:17336)
    at ThemeProvider (https://localhost:8080/bundle.js:10729:3)
    at HelmetProvider (eval at ES6ProxyComponentFactory (https://localhost:8080/bundle.js:110394:10), <anonymous>:14:7)
    at ComponentsProvider (https://localhost:8080/bundle.js:10188:7)
    at Router (eval at ES6ProxyComponentFactory (https://localhost:8080/bundle.js:110394:10), <anonymous>:14:7)
    at MemoryRouter (eval at ES6ProxyComponentFactory (https://localhost:8080/bundle.js:110394:10), <anonymous>:14:7)
    at ExtensionConnector (https://localhost:8080/bundle.js:20891:5)
    at ExtensionProvider (https://localhost:8080/bundle.js:21032:7)
    at PersistGate (eval at ES6ProxyComponentFactory (https://localhost:8080/bundle.js:110394:10), <anonymous>:14:7)
    at Provider (https://localhost:8080/bundle.js:114221:3)

@goldfix
Copy link
Author

goldfix commented Aug 6, 2024

Hi,

maybe I found the problem. Is mandatory to set these two parameter:
VERTEX_BIGQUERY_LOOKER_CONNECTION_NAME
BIGQUERY_EXAMPLE_PROMPTS_CONNECTION_NAME

thanks

@goldfix
Copy link
Author

goldfix commented Aug 6, 2024

hi

sometimes the application does not start and waiting something:

image

What is it "WDS"?

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant