Azure Static Web App 无法连接到 Supabase。

huangapple go评论69阅读模式
英文:

Azure Static Web App unable to connect to Supabase

问题

所以,我在Azure上托管了一个静态Web应用(学习目的),并且在Vercel上也托管了同一个应用。它们都指向同一个Supabase项目。

过去,我曾在Vercel上遇到过缓存Prisma构件的问题,而Azure实际上显示来自PostGres数据库的内容。现在,我已经部署了(更改了生成脚本),问题似乎已经转移,尽管现在当我尝试在我的Azure应用上登录时,我收到以下错误消息:

AuthRetryableFetchError: URL is not valid or contains user credentials.

这一切都始于我更新了一个yml文件(修复了Azure部署问题),但然后我似乎遇到了我在Azure上使用的Supabase变量的问题。Vercel应用程序正在从Supabase加载内容,但Azure没有。因此,我在Azure上删除了这些变量,然后重新输入它们,现在我遇到了上面的错误。

我认为错误出现在Azure中,尽管我还不100%确定,但我现在很困扰...

我尝试过的事情:

  • ChatGPT
  • 重新部署yml
  • 更新Azure Web应用程序令牌
  • 删除Azure环境变量并重新输入
  • 在Vercel应用上测试相同的变量
  • 使用相同的环境变量和一些Supabase项目测试相同的分支
英文:

So, I have a static web app hosted on Azure (learning purposes), and the same app hosted on Vercel. Both of them point to the same Supabase project.

I have had in the past issues with Vercel caching prisma artifacts and Azure actually displaying the content from the PostGres DB. Now, I have deployed (changing my scripts to generate) and the issue appears to have switched, although now when I try to login on my Azure app, I get:

AuthRetryableFetchError: URL is not valid or contains user credentials.

This has all started after I updated a yml file (which fixed an Azure deployment issue), but then I had an apparent issue with the supabase variables I was useing on Azure. The Vercel app was loading content from supabase, but Azure doesn't. So, I deleted the variables on Azure, and re-entered them and now I have reached the error above.

I believe the error to be in Azure, although I am not 100% sure yet, but I'm struggling now ...

What I've tried:

  • ChatGPT
  • Redeploying the yml
  • Updating the Azure web app token
  • Removing Azure env variables and re-entering
  • Tested the same variables on the Vercel app
  • Tested the same branch, with the same env vars and some supabase project

答案1

得分: 0

错误消息“AuthRetryableFetchError:URL无效或包含用户凭据”表明URL或用户凭据存在问题。

  1. 检查Supabase凭据和CORS设置

  2. 验证Azure门户中的环境变量,检查它们是否正确映射并与Supabase凭据匹配。

  3. 检查Azure部署日志,查看与Supabase连接相关的任何错误或警告。

  4. 检查Azure AD身份验证和授权日志。

  5. 检查网关日志和活动日志以查找任何问题。

使用以下查询(从MSDoc引用的查询)来检查应用程序网关日志。

AzureDiagnostics
| where ResourceType == "APPLICATIONGATEWAYS" and OperationName == "ApplicationGatewayAccess" and httpStatus_d > 399
| summarize AggregatedValue = count() by bin(TimeGenerated, 1h), _ResourceId
| render timechart

有关更多信息,请查看此博客

英文:

>The error message AuthRetryableFetchError: URL is not valid or contains user credentials shows that there is an issue with the URL or the user credentials.

  1. Check the Supabase credentials and CORS Settings.

  2. Verify the environment variables in Azure portal and check whether they are mapped correctly and match with the Supabase credentials.

Azure Static Web App 无法连接到 Supabase。

  1. Check the Azure deployment logs for any errors or warnings related to Supabase connectivity.

  2. Check the Azure AD authentication and authorization logs.

Azure Static Web App 无法连接到 Supabase。

  1. Check the Gateway logs and activity logs for any issues.

Azure Static Web App 无法连接到 Supabase。

Use the below query (query reference from MSDoc) to check the application Gateway logs.

AzureDiagnostics  
| where ResourceType == "APPLICATIONGATEWAYS" and OperationName == "ApplicationGatewayAccess" and httpStatus_d > 399  
| summarize AggregatedValue = count() by bin(TimeGenerated, 1h), _ResourceId  
| render timechart

Azure Static Web App 无法连接到 Supabase。

For more information, check this blog.

huangapple
  • 本文由 发表于 2023年6月15日 05:22:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/76477625.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定