Skip to content

Troubleshooting

The Configuration app shows "Setup incomplete"

The app doesn't have Cortex AI access, or it was granted after the install finished.

  1. As ACCOUNTADMIN, run GRANT DATABASE ROLE snowflake.cortex_user TO APPLICATION wire_native_app;.
  2. Open the Setup page and select Enable AI Features.

You don't need to reinstall. See After installing.

deploy_sample fails with a warehouse error

ERROR: the application cannot use warehouse "..."

The application itself needs USAGE on the warehouse, because it owns the sample viewer:

GRANT USAGE ON WAREHOUSE wire_xs_wh TO APPLICATION wire_native_app;

Binding the Warehouse for running agents reference on the app's permissions page isn't enough, even though it shows as Granted.

GRANT IMPORTED PRIVILEGES ON DATABASE SNOWFLAKE fails

This is expected. Grant the snowflake.cortex_user and, optionally, snowflake.usage_viewer database roles instead.

Saving an agent lists GRANT statements

The app can't reach the agent's input view or output table. Run the statements it lists. See Grant the app access.

validate_view reports NULLs

Some rows in your view have a NULL ID or UPDATED_DTM. Those rows are skipped or reprocessed on every run. Fix the data or filter those rows out in the view.

Some rows have no results

The run's status is COMPLETED_WITH_ERRORS. Cortex returns no value, rather than an error, when it can't produce a result for a row. Find the affected rows:

SELECT id, agent_metrics:error::STRING AS error
  FROM my_db.my_schema.triage_output
 WHERE NOT IS_NULL_VALUE(agent_metrics:error);

Use IS_NULL_VALUE, not IS NOT NULL: on a successful row, agent_metrics:error is a JSON null, which isn't the same as SQL NULL.

The most common cause is the model leaving a required field out of a long response. It varies from run to run, so rerun the affected rows:

CALL wire_native_app.main.run_work_item_agent(
    use_case => 'tickets', agent_name => 'ticket_analysis',
    data_filter => 'i.id IN (''TKT-1'', ''TKT-2'')', reload_ind => TRUE
);

If the same rows keep failing, shorten the fields your prompt or response format asks for.

Rows are reprocessed on every run

Check that your output table's ETL_CREATED_DTM is exactly TIMESTAMP_NTZ, and that your input view's UPDATED_DTM has no NULLs. See the output table contract.

A run fails with invalid identifier

Your output table is missing a required column, usually RESPONSE or AGENT_EXECUTION_ID. Run validate_table on it.

Still stuck?

Contact support and include the run's row from control.agent_execution. It has the status, error message, configuration, and query IDs we need.