-
Notifications
You must be signed in to change notification settings - Fork 927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V2 Functions with uppercase letters are not deployed #7344
Comments
This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information. |
Can you run |
@KSiejka without debug I am hitting this:
|
According to this comment you are trying to downgrade function from v2 to v1. If that's not the case, make sure your firebase-tools are upgraded to the newest version and try importing the v2 functions library to force it to be V2. |
@KSiejka i am not trying to downgrade anything, before #7341 start to hit error this morning, the same codebase was deploying. This is the same codebase that is using a v2 function and it was deploying some hours ago and no changes has occur on the dependencies (which are latests) and not change on the code, but thanks for your comment anyways |
Same here, Is there any ETA fix on this? |
I downgraded firebase-tools to 11.x and it started working |
this is working for me now with the latests firebase-tools |
Hey folks, I’m currently trying to reproduce this issue. Similar to @KSiejka, I’m able to deploy functions without any issues. For those still encountering this, could you please provide code snippets of the functions you’re trying to deploy? From what I can gather based on the report, functions names with uppercase letters like below should raise issues during deployments: const { onRequest } = require("firebase-functions/v2/https");
const logger = require("firebase-functions/logger");
const { onDocumentCreated } = require("firebase-functions/v2/firestore");
exports.helloWorld = onRequest((request, response) => {
logger.info("Hello logs!", { structuredData: true });
response.send("Hello from Firebase!");
});
exports.myFunctionOnCreate = onDocumentCreated("users/{userId}", (event) => {
const snapshot = event.data;
if (!snapshot) {
console.log("No data associated with the event");
return;
}
const data = snapshot.data();
const name = data.name;
logger.info("Username:", name);
}); Please let me know if I’m missing anything here. I’m using |
Right now for me is working back again and I have my functions with uppercase letters, for example: "user-Profile-onCreate" |
This was causing issue |
I’m still unable to reproduce the issue. Any chance you could try running Also, I can’t seem to find the exact error message you shared. The closest error message I could find was from firebase-tools/src/deploy/functions/validate.ts Lines 200 to 210 in d1a372e
But this would raise an error similar to
Could you check if you’re using an older version of firebase-tools? The naming restriction was lifted in v11.29.0. |
Thnx I actually downgraded to unblock myself. Feel free to close this. If I
face this issue post upgrade will reopen or file a new one
…On Thu, 20 Jun 2024 at 1:54 AM, aalej ***@***.***> wrote:
I’m still unable to reproduce the issue. Any chance you could try running firebase
deploy --debug while using firebase-tools v13.11.2 to see if the issue
would still persist? If the issue still occurs, could you share the
contents of the firebase-debug.log file? Please remove any personal
identifiable information(PII) before sharing.
Also, I can’t seem to find the exact error message you shared. The closest
error message I could find was from
https://github.com/firebase/firebase-tools/blob/master/src/deploy/functions/validate.ts#L200-L210,
but this would raise an error similar to
Error: <INVALID_FUNCTION_NAME> function name(s) can only contain letters, numbers, hyphens, and not exceed 62 characters in length
Could you check if you’re using an older version of firebase-tools? The
naming restriction was lifted in v11.29.0
<https://github.com/firebase/firebase-tools/releases/tag/v11.29.0>.
—
Reply to this email directly, view it on GitHub
<#7344 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ4MLWXYCRGFX6KRAFQSPTZIHSHNAVCNFSM6AAAAABJRXYPNGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZZGQYTKNBVG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
[REQUIRED] Environment info
firebase-tools: [13.11.2]
mac
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
create or deploy any functions with uppercase
[REQUIRED] Expected behavior
Should deploy
[REQUIRED] Actual behavior
v2 function name(s) can only contain lower case letters, numbers, hyphens, and not exceed 62 characters in length
The text was updated successfully, but these errors were encountered: