zanoon / health-app-demo

GNU General Public License v3.0
0 stars 0 forks source link

Sweep: find build erorrs in details od this issue #12

Closed zanoon closed 9 months ago

zanoon commented 9 months ago

Details

TypeError: "secret" is required 60.51 at get (/usr/src/app/node_modules/@auth0/nextjs-auth0/dist/auth0-session/get-config.js:164:15) 60.51 at getConfig (/usr/src/app/node_modules/@auth0/nextjs-auth0/dist/config.js:78:43) 60.51 at _initAuth (/usr/src/app/node_modules/@auth0/nextjs-auth0/dist/index.js:34:37) 60.51 at getInstance (/usr/src/app/node_modules/@auth0/nextjs-auth0/dist/index.js:23:38) 60.51 at withApiAuthRequired (/usr/src/app/node_modules/@auth0/nextjs-auth0/dist/index.js:108:18) 60.51 at 1805 (/usr/src/app/.next/server/pages/appointment/[id]/upload.js:266:143) 60.51 at webpack_require (/usr/src/app/.next/server/webpack-runtime.js:25:42) 60.51 at /usr/src/app/.next/server/pages/appointment/[id]/upload.js:300:78 60.51 at webpack_require.a (/usr/src/app/.next/server/webpack-runtime.js:89:13) 60.51 at 471 (/usr/src/app/.next/server/pages/appointment/[id]/upload.js:280:21) 60.52 TypeError: "secret" is required 60.52 at get (/usr/src/app/node_modules/@auth0/nextjs-auth0/dist/auth0-session/get-config.js:164:15) 60.52 at getConfig (/usr/src/app/node_modules/@auth0/nextjs-auth0/dist/config.js:78:43) 60.52 at _initAuth (/usr/src/app/node_modules/@auth0/nextjs-auth0/dist/index.js:34:37) 60.52 at getInstance (/usr/src/app/node_modules/@auth0/nextjs-auth0/dist/index.js:23:38) 60.52 at withApiAuthRequired (/usr/src/app/node_modules/@auth0/nextjs-auth0/dist/index.js:108:18) 60.52 at 3115 (/usr/src/app/.next/server/pages/booking/[id].js:568:143) 60.52 at webpack_require (/usr/src/app/.next/server/webpack-runtime.js:25:42) 60.52 at /usr/src/app/.next/server/pages/booking/[id].js:599:81 60.52 at webpack_require.a (/usr/src/app/.next/server/webpack-runtime.js:89:13) 60.52 at 92 (/usr/src/app/.next/server/pages/booking/[id].js:584:21) 60.53 60.53 > Build error occurred 60.54 Error: Failed to collect page data for /appointment/[id]/upload 60.54 at /usr/src/app/node_modules/next/dist/build/utils.js:959:15 { 60.54 type: 'Error' 60.54 }

Checklist - [X] Modify `docker-compose.yml` ✓ https://github.com/zanoon/health-app-demo/commit/0fde4c277f04f2dcbd95d3f378c1923cf0fbceb0 [Edit](https://github.com/zanoon/health-app-demo/edit/sweep/find_build_erorrs_in_details_od_this_iss/docker-compose.yml#L3-L3) - [X] Running GitHub Actions for `docker-compose.yml` ✓ [Edit](https://github.com/zanoon/health-app-demo/edit/sweep/find_build_erorrs_in_details_od_this_iss/docker-compose.yml#L3-L3) - [X] Modify `infrastructure/customer-webapp/Dockerfile` ✓ https://github.com/zanoon/health-app-demo/commit/9421ecb89c34d8ae3121c5745f83535b5d3c558d [Edit](https://github.com/zanoon/health-app-demo/edit/sweep/find_build_erorrs_in_details_od_this_iss/infrastructure/customer-webapp/Dockerfile#L2-L2) - [X] Running GitHub Actions for `infrastructure/customer-webapp/Dockerfile` ✓ [Edit](https://github.com/zanoon/health-app-demo/edit/sweep/find_build_erorrs_in_details_od_this_iss/infrastructure/customer-webapp/Dockerfile#L2-L2) - [X] Modify `web-app/customer/next.config.js` ✓ https://github.com/zanoon/health-app-demo/commit/1f4b0f95cd29d2a30db18f0bcc69abc56471b5e7 [Edit](https://github.com/zanoon/health-app-demo/edit/sweep/find_build_erorrs_in_details_od_this_iss/web-app/customer/next.config.js#L1-L1) - [X] Running GitHub Actions for `web-app/customer/next.config.js` ✓ [Edit](https://github.com/zanoon/health-app-demo/edit/sweep/find_build_erorrs_in_details_od_this_iss/web-app/customer/next.config.js#L1-L1)
sweep-ai[bot] commented 9 months ago

🚀 Here's the PR! #14

See Sweep's progress at the progress dashboard!
Sweep Basic Tier: I'm using GPT-4. You have 5 GPT-4 tickets left for the month and 3 for the day. (tracking ID: 244bf699fa)

For more GPT-4 tickets, visit our payment portal. For a one week free trial, try Sweep Pro (unlimited GPT-4 tickets).

Actions (click)

Sandbox Execution ✓

Here are the sandbox execution logs prior to making any changes:

Sandbox logs for 8fcf153
Checking docker-compose.yml for syntax errors... ✅ docker-compose.yml has no syntax errors! 1/1 ✓
Checking docker-compose.yml for syntax errors...
✅ docker-compose.yml has no syntax errors!

Sandbox passed on the latest main, so sandbox checks will be enabled for this issue.


Step 1: 🔎 Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I think are relevant in decreasing order of relevance (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/zanoon/health-app-demo/blob/8fcf153fda0ac420a737bf03af242e6bf277a2ef/docker-compose.yml#L1-L192 https://github.com/zanoon/health-app-demo/blob/8fcf153fda0ac420a737bf03af242e6bf277a2ef/infrastructure/customer-webapp/Dockerfile#L1-L15 https://github.com/zanoon/health-app-demo/blob/8fcf153fda0ac420a737bf03af242e6bf277a2ef/infrastructure/rest-api/Dockerfile#L1-L30 https://github.com/zanoon/health-app-demo/blob/8fcf153fda0ac420a737bf03af242e6bf277a2ef/infrastructure/celery-worker/Dockerfile#L1-L28

Step 2: ⌨️ Coding

--- 
+++ 
@@ -1,6 +1,8 @@
 version: "3.9"
 services:
   customer-webapp:
+    environment:
+      - AUTH0_SECRET_FILE=/run/secrets/auth0_secret
     restart: always
     build:
       context: .
@@ -198,3 +200,7 @@
   pgadmin:
   elasticsearch-data:
   rabbitmq:
+
+secrets:
+  auth0_secret:
+    file: ./auth0_secret.txt

Ran GitHub Actions for 0fde4c277f04f2dcbd95d3f378c1923cf0fbceb0:

--- 
+++ 
@@ -1,5 +1,6 @@
 FROM node:19
 ARG NEXT_PUBLIC_DATADOG_VERSION
+ARG AUTH0_SECRET
 ENV NEXT_PUBLIC_DATADOG_VERSION=${NEXT_PUBLIC_DATADOG_VERSION}
 WORKDIR /usr/src/app

Ran GitHub Actions for 9421ecb89c34d8ae3121c5745f83535b5d3c558d:

--- 
+++ 
@@ -13,4 +13,11 @@
   },
 };

-module.exports = nextConfig;
+module.exports = {
+  auth0: {
+    secret: process.env.AUTH0_SECRET,
+    // other Auth0 configuration...
+  },
+  ...nextConfig,
+  // other Next.js configuration...
+};

Ran GitHub Actions for 1f4b0f95cd29d2a30db18f0bcc69abc56471b5e7:


Step 3: 🔁 Code Review

I have finished reviewing the code for completeness. I did not find errors for sweep/find_build_erorrs_in_details_od_this_iss.


🎉 Latest improvements to Sweep:


💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. Join Our Discord