Streamlit in Snowflake 故障排除¶
在使用 Streamlit in Snowflake 时,以下场景可以帮助您解决可能发生的问题。
您无法连接到 Snowflake 后端¶
在某些情况下,浏览器扩展在正常运行过程中会发起本地网络访问 (LNA) 请求。例如,某个安全类扩展可能会检测 Streamlit in Snowflake 的跨源流量,然后发起一个 LNA 请求。Chrome 142 引入了强制性的 LNA 限制。由于无法在扩展级别配置 LNA,因此您必须禁用该扩展,或者允许 Snowsight 使用 LNA。有关 Chrome 的 LNA 限制的更多信息,请参阅 Chrome for Developers 博客中的文章 本地网络访问的新权限提示 (https://developer.chrome.com/blog/local-network-access)。
错误 |
无法连接到 Snowflake 后端。 |
|---|---|
原因 |
某个浏览器扩展尝试发起本地网络访问 (LNA) 请求,但该请求被 Chrome 的 LNA 限制所阻止。 |
解决方案 |
禁用该浏览器扩展,或允许 Snowsight 使用 LNA。 |
如果在完成以下步骤后问题仍然存在,请联系 Snowflake 支持团队:
确认您正在使用最新版本的 Snowsight。
确认已为 Snowsight 启用“本地网络访问”权限。如果您使用的是企业管理的浏览器,请联系您的 IT 管理员。
确认在暂时禁用所有扩展后,加载失败问题是否仍然存在。
确认通过
chrome://flags#local-network-access-check禁用相应的 Chrome 标志后,加载失败问题是否仍然存在。
You can't load the Streamlit app¶
在 Streamlit in Snowflake 中运行的每个 Streamlit 应用程序都使用唯一的子域。
Ensure that *.snowflakeapp.cn and *.snowflake.cn are on the allowlist in your network (including content filtering systems), and
can connect to Snowflake. When these domains are on the allowlist, your apps can communicate with Snowflake servers without any restrictions.
However, in some cases adding these domains may not be sufficient due to network policies blocking subpaths under them. If this occurs,
contact your network administrator.
此外,为防止连接到 Snowflake 后端出现任何问题,请确保网络配置中未阻止 WebSockets。
错误 |
Could not reload streamlit files.
Error: 092806 (P0002): The specified Streamlit was not found.
|
|---|---|
原因 |
Snowflake WebSocket 连接无法连接到与应用程序关联的端点。 |
解决方案 |
Add *.snowflakeapp.cn to the allowlist on the organization's firewall configuration. |
You can't see your data or change your database¶
您可能无法查看数据或更改数据库、仓库或角色,因为 Streamlit 应用程序使用所有者权限运行,这意味着它们在运行的时候会使用所有者的权限,而不是调用者的权限。Streamlit 应用程序使用在其中创建了 Streamlit in Snowflake 应用程序的数据库和架构,而非调用者当前使用的数据库和架构。
For more information, see 了解所有者的权限和 Streamlit in Snowflake 应用程序.
Streamlit library feature doesn't work¶
确保使用 Streamlit in Snowflake 支持的 Streamlit 库版本和功能。有关更多信息,请参阅 仓库运行时中支持的 Streamlit 库版本 和 不支持的 Streamlit 功能。
要询问有关开源 Streamlit 库中功能的问题,请参阅 Streamlit 社区论坛 (https://discuss.streamlit.io/)。