firebase / firebase-tools

The Firebase Command Line Tools
MIT License
3.97k stars 915 forks source link

URL rewrites not working on static assets with firebase deploy on firebase-tools@^13.9.0 #7363

Closed wongchichong closed 4 days ago

wongchichong commented 1 week ago

firebase-tools:

Windows

firebase deploy --only hosting

with firebase-tools > v13.9.0

      {
        "source": "**",
        "destination": "/index.html"
      }

not working on static assets. all graphics not loading.

downgrading to firebase-tools@13.9.0

static assets works again.

Fric56 commented 1 week ago

Same here. firebase-tools@13.11.2) was the last version that worked for me.

ClashOfStyles commented 1 week ago

Same! Thanks, switching to 13.9.0 saves me a lot of time!

pogorv12 commented 5 days ago

Same with me.

I spotted that the number of deployed files decreased after update. So for me it looks like files located in subfolders of public dir are not deployed.

aalej commented 5 days ago

Hey folks, sorry to hear you’re encountering this issue and thanks for reporting this. At the moment, I can’t seem to reproduce the issue on macOS machines. However, I was able to reproduce this on a Windows machine.

I’ll raise this to our engineering team so that we can investigate the cause of the issue. For those encountering this, could you let me know if you’re also using a Windows machine?

As a workaround, please use v13.11.2. I was able to deploy to Firebase Hosting without any issues using this version.

ksmutny commented 5 days ago

Encountered the same problem. 13.11.2 works for me, 13.11.3 and 13.11.4 do not.

Windows 11 Pro 23H2, Node 21.7.3., firebase-tools installed globally.

Encountered also with a deploy from GitHub Actions, which runs on windows-latest.

It seems to me the problem is not rewrites, but uploading the assets. I was unable to load them using the real path. (e.g. html/en/index.html). It happened on my production server, so I didn't investigate too much and redeployed using 13.11.2.

pureimpro commented 5 days ago

Same issue for me, on Windows, workaround by downgrading to 13.11.2, after numerous hours of headache

Robula commented 4 days ago

Likely related https://github.com/firebase/firebase-tools/issues/7378

Wrakie commented 4 days ago

I spent the whole day trying to figure out what I did wrong 😭😭😭