You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The storage emulator within an executed script (with exec commande) is inconsistant because the emulator will always return that any file is existant, whatever file name you give him.
[REQUIRED] Steps to reproduce
Execute the following snippet within the emulator (storage emulator needed). The output will always be true.
// firebase emulators:exec test.jsconstadmin=require('firebase-admin');admin.initializeApp({storageBucket: 'default-bucket'});constbucket=admin.storage().bucket();constfile=bucket.file(`/inexistantFile`);const[exists]=awaitfile.exists();console.log('inexistantFile: ',exists);// exists will always be true
[REQUIRED] Expected behavior
The emulator to be consistant. The File.exists()method should returns false when a file was never created or deleted.
[REQUIRED] Actual behavior
The File.exists() method always returns true even for non existing files.
The text was updated successfully, but these errors were encountered:
yairopro
changed the title
Storage emulator - exec: admin.storage().bucket() is inconsistent
Storage emulator in execution is inconsistent
Sep 19, 2021
abeisgoat
changed the title
Storage emulator in execution is inconsistent
file.exists() is always true
Sep 20, 2021
This is actually outside the current scope of the emulator as the exists() method is not one we guarantee to be correct atm. We're working on extending Google Cloud API support, so hopefully this will function correctly in the near future.
[REQUIRED] Environment info
firebase-tools: 9.18.0
Platform: macOS
[REQUIRED] Test case
The storage emulator within an executed script (with
exec
commande) is inconsistant because the emulator will always return that any file is existant, whatever file name you give him.[REQUIRED] Steps to reproduce
Execute the following snippet within the emulator (storage emulator needed). The output will always be true.
[REQUIRED] Expected behavior
The emulator to be consistant. The
File.exists()
method should returnsfalse
when a file was never created or deleted.[REQUIRED] Actual behavior
The
File.exists()
method always returnstrue
even for non existing files.The text was updated successfully, but these errors were encountered: