-
Notifications
You must be signed in to change notification settings - Fork 261
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
Cloud function Error #72
Comments
Hi @tobimichigan ! What Node.js version do you use? Try to use Node.js 6 |
I have the same problem to): |
seems to bee the problem with this line |
@Batishev-Rozdoum what you say about that ? |
@Batishev-Rozdoum , I dont think this is a node version issue. You should be aware that google is often updating their cloud functionalities. I am still debugging your repo and will give feedback shortly. @sourimoto I don't think your solution is practicable cos of runtime bugs. |
@tobimichigan i don't have any runtime error, but I think the problem set in the billing |
i am also facing this issue . did any one solve this ? |
i am also facing problem i mean to say is their any other method |
@shyamguptaa i have successfully uploaded cloud functions except generateThumnail by modifying index.js file. |
Google sign in method didn't work on Android 8.0 (API level 26 or later), for Android 5.1 (API level 22) it's working fine. |
please upload updated Index.js file |
Hi guys! Just in case, here is my parameters for working functions:
Hope it helps |
just remove the thumbnails function and rest of functions will work. |
I Solved by const gcs = require('@google-cloud/storage'); |
no that's not the problem |
Hi there developers,
I recently started working on this repo and set it up successfully but during the cloud function deployment, issues sprung up:
Original from repo
index.js
`const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp(functions.config().firebase);
const actionTypeNewLike = "new_like";
const actionTypeNewComment = "new_comment";
const actionTypeNewPost = "new_post";
const notificationTitle = "Social App";
const followingPosDbValue = "following_post";
const followingPosDbKey = "followingPostsIds";
const followingsDbKey = "followings";
const followersDbKey = "followers";
const followingDbKey = "follow";
const postsTopic = "postsTopic";
const THUMB_MEDIUM_SIZE = 1024; //px
const THUMB_SMALL_SIZE = 100; //px
const THUMB_MEDIUM_DIR = "medium";
const THUMB_SMALL_DIR = "small";
const gcs = require('@google-cloud/storage')();
const path = require('path');
const sharp = require('sharp');
const os = require('os');
const fs = require('fs');
exports.pushNotificationLikes = functions.database.ref('/post-likes/{postId}/{authorId}/{likeId}').onCreate((snap, context) => {
});
exports.pushNotificationComments = functions.database.ref('/post-comments/{postId}/{commentId}').onCreate((snap, context) => {
});
exports.pushNotificationNewPost = functions.database.ref('/posts/{postId}').onCreate((snap, context) => {
const postId = context.params.postId;
});
exports.addNewPostToFollowers = functions.database.ref('/posts/{postId}').onCreate((snap, context) => {
const postId = context.params.postId;
});
exports.removePostFromFollowingList = functions.database.ref('/posts/{postId}').onDelete((snap, context) => {
const postId = context.params.postId;
const authorId = snap.val().authorId;
});
exports.generateThumbnail = functions.storage.object().onFinalize((object) => {
const fileBucket = object.bucket; // The Storage bucket that contains the origin file.
const filePath = object.name; // File path in the bucket.
const contentType = object.contentType; // File content type.
});
function generateThumbnailsGeneral(fileBucket, filePath, contentType) {
console.log("fileBucket", fileBucket);
console.log("filePath", filePath);
console.log("contentType", contentType);
}
function createThumb(fileName, originFilePath, tempFilePath, thumbDir, size, bucket) {
const newFileTemp = path.join(os.tmpdir(),
${fileName}_${size}_tmp.jpg
);const newFilePath = path.join(path.dirname(originFilePath), thumbDir, fileName);
}
Please is anyone there with good pointers as to why this error occurs?
`
The text was updated successfully, but these errors were encountered: