rigby-sh / solace-medusa-starter

https://solace-medusa-starter.vercel.app
23 stars 8 forks source link

How to generate strapi STRAPI_WEBHOOK_REVALIDATION_SECRET= #91

Open chillpilllike opened 3 weeks ago

chillpilllike commented 3 weeks ago

Hello!

I am unable to find any guide or anywhere as how to generate:

STRAPI_WEBHOOK_REVALIDATION_SECRET=

I am unable to connect to strapi. I used your image to install strapi.

frontend gives the error:

Screenshot 2024-10-29 at 6 12 51 pm
chillpilllike commented 3 weeks ago

Unable to launch the store it just don't fetch anything from strapi.

9 50.25 > Build error occurred

9 50.25 Error: Failed to collect page data for /[countryCode]/blog/[slug]

9 50.25 at /app/node_modules/next/dist/build/utils.js:1268:15

9 50.25 at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {

9 50.25 type: 'Error'

9 50.25 }

9 50.31 error Command failed with exit code 1.

chillpilllike commented 3 weeks ago

You guys need to check it properly or provide proper instructions in details as how to generate the values.

chillpilllike commented 3 weeks ago

a short video about the launch would be very helpful.

KamilNahotko commented 3 weeks ago

@chillpilllike Hi! Thank you for reporting this. We've just updated our README with detailed instructions on how to set this up - please check the Prerequisites section under Strapi configuration: https://github.com/rigby-sh/solace-medusa-starter#prerequisites

Let me know if you need any clarification or run into other issues!

chillpilllike commented 3 weeks ago

Thank you for the update, I followed everything correctly. but the error to fetch data from strapi still persists:

$ next dev -p 8000 ▲ Next.js 14.2.16

npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-10-31T04_52_13_124Z-debug-0.log ○ Compiling /src/middleware ... ✓ Compiled /src/middleware in 551ms (89 modules) ○ Compiling /[countryCode] ... ✓ Compiled /[countryCode] in 16s (4872 modules)

[webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Unable to snapshot resolve dependencies ✓ Compiled in 979ms (2094 modules) Initiating Medusa client with default headers: { "accept": "application/json", "content-type": "application/json", "x-publishable-api-key": "pk_2a03247a9bba676354504f257ebf79cd734e6f16384bdbb4d724db5b9ff8e8ea", "authorization": "" } Initiating Medusa client with default headers: { "accept": "application/json", "content-type": "application/json", "x-publishable-api-key": "pk_2a03247a9bba676354504f257ebf79cd734e6f16384bdbb4d724db5b9ff8e8ea", "authorization": "" } Performing request to: URL: https://backend-backend-secretgreen9-v2.xcbkmg.easypanel.host/store/collections?limit=100&offset=0 Headers: { "accept": "application/json", "content-type": "application/json", "next": "[object Object]", "x-publishable-api-key": "pk_2a03247a9bba676354504f257ebf79cd734e6f16384bdbb4d724db5b9ff8e8ea", "authorization": "" } Performing request to: URL: https://backend-backend-secretgreen9-v2.xcbkmg.easypanel.host/store/regions Headers: { "accept": "application/json", "content-type": "application/json", "next": "[object Object]", "x-publishable-api-key": "pk_2a03247a9bba676354504f257ebf79cd734e6f16384bdbb4d724db5b9ff8e8ea", "authorization": "" } Performing request to: URL: https://backend-backend-secretgreen9-v2.xcbkmg.easypanel.host/store/product-categories?fields=%2Bcategory_children Headers: { "accept": "application/json", "content-type": "application/json", "next": "[object Object]", "x-publishable-api-key": "pk_2a03247a9bba676354504f257ebf79cd734e6f16384bdbb4d724db5b9ff8e8ea", "authorization": "" } Performing request to: URL: https://backend-backend-secretgreen9-v2.xcbkmg.easypanel.host/store/product-categories?limit=100&offset=0 Headers: { "accept": "application/json", "content-type": "application/json", "next": "[object Object]", "x-publishable-api-key": "pk_2a03247a9bba676354504f257ebf79cd734e6f16384bdbb4d724db5b9ff8e8ea", "authorization": "" } Received response with status 200 Performing request to: URL: https://backend-backend-secretgreen9-v2.xcbkmg.easypanel.host/store/products?limit=9&offset=0®ion_id=reg_01JB8V7H8RQ4QQ1Y3RRCG3QCSJ&fields=%2Avariants.calculated_price%2C%2Bvariants.inventory_quantity%2C%2Avariants%2C%2Avariants.prices Headers: { "accept": "application/json", "content-type": "application/json", "next": "[object Object]", "x-publishable-api-key": "pk_2a03247a9bba676354504f257ebf79cd734e6f16384bdbb4d724db5b9ff8e8ea", "authorization": "" } Performing request to: URL: https://backend-backend-secretgreen9-v2.xcbkmg.easypanel.host/store/products?limit=4&offset=0®ion_id=reg_01JB8V7H8RQ4QQ1Y3RRCG3QCSJ&fields=%2Avariants.calculated_price%2C%2Bvariants.inventory_quantity%2C%2Avariants%2C%2Avariants.prices Headers: { "accept": "application/json", "content-type": "application/json", "next": "[object Object]", "x-publishable-api-key": "pk_2a03247a9bba676354504f257ebf79cd734e6f16384bdbb4d724db5b9ff8e8ea", "authorization": "" } Received response with status 200 Received response with status 200 Received response with status 200 ⨯ src/lib/data/fetch.ts (28:11) @ fetchStrapiClient ⨯ Error: Failed to fetch data at fetchStrapiClient (./src/lib/data/fetch.ts:25:15) at async getCollectionsData (./src/lib/data/fetch.ts:51:17) at async Promise.all (index 2) at async NavWrapper (./src/modules/layout/templates/nav/index.tsx:23:83) digest: "1905712713" 26 | 27 | if (!response.ok) { > 28 | throw new Error('Failed to fetch data') | ^ 29 | } 30 | 31 | return response ⨯ src/lib/data/fetch.ts (28:11) @ fetchStrapiClient ⨯ Error: Failed to fetch data at fetchStrapiClient (./src/lib/data/fetch.ts:25:15) at async getCollectionsData (./src/lib/data/fetch.ts:51:17) at async Promise.all (index 2) at async NavWrapper (./src/modules/layout/templates/nav/index.tsx:23:83) digest: "1905712713" 26 | 27 | if (!response.ok) { > 28 | throw new Error('Failed to fetch data') | ^ 29 | } 30 | 31 | return response Received response with status 200 Received response with status 200 ⨯ src/lib/data/fetch.ts (28:11) @ fetchStrapiClient ⨯ Error: Failed to fetch data at fetchStrapiClient (./src/lib/data/fetch.ts:25:15) at async getCollectionsData (./src/lib/data/fetch.ts:51:17) at async Promise.all (index 0) at async Home (page.tsx:52:101) digest: "212186416" 26 | 27 | if (!response.ok) { > 28 | throw new Error('Failed to fetch data') | ^ 29 | } 30 | 31 | return response ⨯ src/lib/data/fetch.ts (28:11) @ fetchStrapiClient ⨯ Error: Failed to fetch data at fetchStrapiClient (./src/lib/data/fetch.ts:25:15) at async getCollectionsData (./src/lib/data/fetch.ts:51:17) at async Promise.all (index 0) at async Home (page.tsx:52:101) digest: "212186416" 26 | 27 | if (!response.ok) { > 28 | throw new Error('Failed to fetch data') | ^ 29 | } 30 | 31 | return response GET /au 500 in 17611ms [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Unable to snapshot resolve dependencies [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Unable to snapshot resolve dependencies **_**I have setup the strapi webbhook correctly:**_** https://common-solace2.xcbkmg.easypanel.host/api/strapi-revalidate?secret=155f1e4372952a46bd56e6b2797383d9d0a910c7c9e929da2dc6c6195541687e ****_I even get response from strapi api correctly when I run:_**** curl -X GET https://common-strapi2.xcbkmg.easypanel.host/api/about-us \ -H "Authorization: Bearer 8828d81ee52346556de6128557d32becc5cc00c9391ff6817495927e8f557ccd15ad5a79c942ff78534f852f91c5cb1b67edca5502e1db949e073e81290075ee4d7f0c3829319ffcaa3c0562cf5241eb0c8f07ff703a83a5d088ebab45164f93be851603a794f6bc9a0ce61bb61556d37e1e4180769dc19cb2c4669583e331b0"
chillpilllike commented 3 weeks ago

I tried many many times but unable to get through strapi fetch error. Could you guys launch a video tutorial to launch it using easypanel or a blog.

KamilNahotko commented 3 weeks ago

@chillpilllike Regarding the video tutorial request - while we don't have a video tutorial specifically for Easypanel deployment yet, we do have a comprehensive written guide that might help:

Although it focuses on Medusa API, the configuration steps for Strapi are very similar.

I also noticed that your Strapi instance (https://common-solace2.xcbkmg.easypanel.host/) seems to be inaccessible - when accessing this URL, the Strapi dashboard should be visible.

Are you sure you're using our repository? This could be the source of compatibility issues.

chillpilllike commented 2 weeks ago

I have closed that strapi server. here is my new server details:

solace url: https://common-solace.xcbkmg.easypanel.host

strapi dashboard: https://strapi.gofinch.com already diverted to port 80

strapi api: https://common-strapi2.xcbkmg.easypanel.host already diverted to port 1337

the ports are assigned automatically when we use your strapi repo

curl -X GET https://common-strapi2.xcbkmg.easypanel.host/api/about-us -H "Authorization: Bearer dbcb2e5ebcf6286799fad76aaaafe1ac0f45c165faa041202486c5e0bbff96f4143f0989a507e6892be130d6cd24e1505a4c7be5ed9417a21ce3ddc13ac163b66815a9adce89c66c99f3645a4228f95b9b47f495838ad745a5210acb15e4a9dce5e740c966c3c54925531c0b63ce32aec9b0c1a80b8abf1230bc6a8b06128ffc"

chillpilllike commented 2 weeks ago

I am waiting for a help team, please help

KamilNahotko commented 2 weeks ago

@chillpilllike Sorry for the late reply! Checked your new Strapi instance but it seems to be down at the moment. Could you keep it running so we can help debug the issue?

chillpilllike commented 1 week ago

after I install strapi using your repo:

Welcome back! To manage your project 🚀, go to the administration panel at: http://localhost:80/admin

To access the server ⚡️, go to: http://localhost:80

https://cms-strapi.ujg6du.easypanel.host it is diverted to port 80 but when I visit it launches admin even if I haven't redirected the path to /admin

https://strapi.gofinch.com is diverted to port 1337

in public permission I have checked all the content types.

KamilNahotko commented 1 week ago

@chillpilllike I'm getting timeout errors when trying to access your staging environment. Could you please confirm if the staging instance is currently running? Also, it would be really helpful if you could keep it running continuously so we can properly investigate the issue.