Http Error 502 I am trying last 4 days. anyone help me please

fly.toml

# fly.toml app configuration file generated for preloder-appaza-api on 2024-07-08T12:35:29+06:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = 'preloder-appaza-api'
primary_region = 'sin'

[env]
  PORT = "8081"
  SHOPIFY_APP_URL = "https://preloder-appaza-api.fly.dev"
  SHOPIFY_API_KEY = "5pe994fc2a4d6171117de907b0ae9857"
  SCOPES = "read_content,read_customers,read_products,read_themes,write_content,write_products,write_themes"

[experimental]
auto_rollback = true
[build]



[http_service]
  internal_port = 8081
  force_https = true
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 1
  processes = ['app']

[[vm]]
  memory = '1gb'
  cpu_kind = 'shared'
  cpus = 1
[mounts]
  source="data"
  destination="/data"

shopify.app.toml

# Learn more about configuring your app at https://shopify.dev/docs/apps/tools/cli/configuration

client_id = "8ae994fc2a4d6171110de907b0ae0857"
name = "appaza-preloader"
handle = "appaza-preloader"
application_url = "https://preloder-appaza-api.fly.dev"
embedded = true

[build]
automatically_update_urls_on_dev = false
dev_store_url = "appaza-preloader.myshopify.com"
include_config_on_deploy = false

[access_scopes]
# Learn more at https://shopify.dev/docs/apps/tools/cli/configuration#access_scopes
scopes = "read_content,read_products,read_themes,write_content,write_products,write_themes"

[auth]
redirect_urls = [
  "https://preloder-appaza-api.fly.dev/auth/callback",
  "https://preloder-appaza-api.fly.dev/auth/shopify/callback",
  "https://preloder-appaza-api.fly.dev/api/auth/callback"
]

[webhooks]
api_version = "2024-01"

[pos]
embedded = false

Logs

2024-07-08T12:53:05.664 app[4d890dedc43318] sin [info] ┌─────────────────────────────────────────────────────────────┐

2024-07-08T12:53:05.664 app[4d890dedc43318] sin [info] │ Deploying your app to serverless or edge functions? │

2024-07-08T12:53:05.664 app[4d890dedc43318] sin [info] │ Try Prisma Accelerate for connection pooling and caching. │

2024-07-08T12:53:05.664 app[4d890dedc43318] sin [info] │ https://pris.ly/cli/--accelerate │

2024-07-08T12:53:05.664 app[4d890dedc43318] sin [info] └─────────────────────────────────────────────────────────────┘

2024-07-08T12:53:06.518 app[4d890dedc43318] sin [info] Environment variables loaded from .env

2024-07-08T12:53:06.518 app[4d890dedc43318] sin [info] Prisma schema loaded from prisma/schema.prisma

2024-07-08T12:53:06.532 app[4d890dedc43318] sin [info] Datasource "db": SQLite database "dev.sqlite" at "file://data/dev.sqlite"

2024-07-08T12:53:06.604 app[4d890dedc43318] sin [info] 1 migration found in prisma/migrations

2024-07-08T12:53:06.607 app[4d890dedc43318] sin [info] No pending migrations to apply.

2024-07-08T12:53:06.920 app[4d890dedc43318] sin [info] > start

2024-07-08T12:53:06.920 app[4d890dedc43318] sin [info] > remix-serve ./build/server/index.js

2024-07-08T12:53:07.772 app[4d890dedc43318] sin [info] (node:451) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time

2024-07-08T12:53:07.772 app[4d890dedc43318] sin [info] (Use `node --trace-warnings ...` to show where the warning was created)

2024-07-08T12:53:08.882 app[4d890dedc43318] sin [info] Error: Cannot initialize Shopify API Library. Missing values for: apiSecretKey

2024-07-08T12:53:08.882 app[4d890dedc43318] sin [info] at validateConfig (file:///app/node_modules/@shopify/shopify-app-remix/node_modules/lib/config.ts:50:11)

2024-07-08T12:53:08.882 app[4d890dedc43318] sin [info] at shopifyApi (file:///app/node_modules/@shopify/shopify-app-remix/node_modules/lib/index.ts:65:27)

2024-07-08T12:53:08.882 app[4d890dedc43318] sin [info] at deriveApi (file:///app/node_modules/@shopify/src/server/shopify-app.ts:158:10)

2024-07-08T12:53:08.882 app[4d890dedc43318] sin [info] at shopifyApp (file:///app/node_modules/@shopify/src/server/shopify-app.ts:66:15)

2024-07-08T12:53:08.882 app[4d890dedc43318] sin [info] at file:///app/build/server/index.js?t=1720442623000:30:17

2024-07-08T12:53:08.882 app[4d890dedc43318] sin [info] at ModuleJob.run (node:internal/modules/esm/module_job:222:25)

2024-07-08T12:53:08.882 app[4d890dedc43318] sin [info] at ModuleLoader.import (node:internal/modules/esm/loader:316:24)

2024-07-08T12:53:08.882 app[4d890dedc43318] sin [info] at run (/app/node_modules/@remix-run/serve/dist/cli.js:112:15)

2024-07-08T12:53:09.492 app[4d890dedc43318] sin [info] INFO Main child exited normally with code: 1

2024-07-08T12:53:09.504 app[4d890dedc43318] sin [info] INFO Starting clean up.

2024-07-08T12:53:09.506 app[4d890dedc43318] sin [info] INFO Umounting /dev/vdc from /data

2024-07-08T12:53:09.507 app[4d890dedc43318] sin [info] WARN could not unmount /rootfs: EINVAL: Invalid argument

2024-07-08T12:53:09.508 app[4d890dedc43318] sin [info] [ 6.665575] reboot: Restarting system

2024-07-08T12:53:09.720 runner[4d890dedc43318] sin [info] machine has reached its max restart count (10)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.