#Infinite Reloads Issue When Upgrading Remix to 1.18.0

1 messages · Page 1 of 1 (latest)

south loom
#

i need help please
I recently performed an upgrade from remix version 1.17.1 to 1.18.0. However, upon running it locally, I encountered a persistent issue of infinite reloading. Unfortunately,
I haven't been able to identify the cause behind this problem just yet.
PS: the project work perfectly on remix version 1.17.1

 /**
 * @type {import("@remix-run/dev").AppConfig}
 */
module.exports = {
  tailwind: true,
  postcss: true,
  ignoredRouteFiles: [".*"],
  // appDirectory: "app",
  // assetsBuildDirectory: "public/build",
  // serverBuildPath: "build/index.js",
  // publicPath: "/build/",
  // devServerPort: 8002
  serverModuleFormat: "cjs",
  future: {
    v2_errorBoundary: true,
    v2_normalizeFormMethod: true,
    v2_meta: true,
    v2_routeConvention: false,
    v2_headers: true,
    v2_dev: true,
  },
};
brave mirage
#

If you create an new route with only the default export, is it still reloading?

quasi hamlet
#

How does the terminal look like with the reloading? Are you using tsx?

violet locust
#

Is there a chance something on your app is changing the URL before Remix can hydrate?

#

Check the server logs and see if it's getting the exact same URL + search params on the reload requests.

We had one other report of this and are waiting on a reproduction but we're pretty confident it would be related to https://github.com/remix-run/remix/pull/6409. Can you turn on dev tools "preserve log" and see if you're getting message in the console on the reloads?

south loom
quasi hamlet
#

Can you share your package.json? At least the part before dependencies?

south loom
# quasi hamlet Can you share your package.json? At least the part before dependencies?
  "name": "my-project",
  "private": true,
  "description": "my-app",
  "license": "",
  "sideEffects": false,
  "prisma": {
    "seed": "ts-node prisma/seed.ts"
  },
  "scripts": {
    "build": "NODE_ENV=production remix build",
    "dev": "run-p dev:*",
    "dev:remix": "cross-env NODE_ENV=development PORT=3025 remix dev",
    "dev:routes-gen": "routes-gen -d @routes-gen/remix -w",
    "db:reset": "yarn prisma migrate reset -f",
    "migrate:create": "yarn prisma migrate dev --name ",
    "migrate": "yarn prisma migrate ",
    "lint": "eslint --ignore-path .gitignore app",
    "lint:fix": "eslint --fix --ignore-path .gitignore app",
    "postinstall": "patch-package",
    "start": "cross-env NODE_ENV=production PORT=3025 remix-serve build",
    "test": "run-p test:*",
    "test:lint": "eslint --ignore-path .gitignore app",
    "format": "prettier --write .",
    "typecheck": "tsc -b",
    "cli": "NODE_ENV=development ts-node --require tsconfig-paths/register"
  },
  "dependencies": {
    "@faire/mjml-react": "^3.3.0",
    "@prisma/client": "^4.16.0",
    "@react-pdf/renderer": "^3.1.12",
    "@remix-run/node": "^1.18.0",
    "@remix-run/react": "^1.18.0",
    "@remix-run/serve": "^1.18.0",
    "@remix-run/server-runtime": "^1.18.0",
   ...
quasi hamlet
#

What happens if you run dev:remix instead of dev?

south loom
quasi hamlet
#

I wonder what occured between 1.17.1 and 1.18.0 that would cause it to loop.

#

try another browser or incognito?

south loom
quasi hamlet
#

Yeah, I'm just throwing darts atm. Could also try disable v2_dev temporarily and see if that changes anything. The usual debug methods, get it working again and work backwards.

south loom
quasi hamlet
#

Mmm, interesting!

#

Sounds like a weird remix app server issue @violet locust ?

violet locust
#

This issue is likely related to the PR I mentioned above. @south loom can you tell me if you see browser console logs indicating the reload? You'll need to turn on Preserve log in the dev tools console settings. You'll be looking for a message such as this