I had a working function in Appwrite 1.5.7, after migrating to the 1.6.0 it does not work. I have updated node-appwrite dependency to 14.1.0 and here is the code snippet from my function:
import {
Client,
Databases,
Users,
Query,
ID
} from "node-appwrite";
class AppwriteService {
constructor(log) {
const client = new Client();
client
.setEndpoint(process.env.APPWRITE_ENDPOINT)
.setProject(process.env.APPWRITE_FUNCTION_PROJECT_ID)
.setKey(process.env.APPWRITE_API_KEY);
this.users = new Users(client);
this.databases = new Databases(client);
this.log = log;
}
async getBranchBy(authId) {
this.log("auth_id: " + authId);
const result1 = await this.databases.getDocument(
"player",
"branches",
"666ddca400367dcf6a25"
);
this.log(result1);
}
I got an error message like: fetch failed
Fixed by assigning function container network configs as an external entity, not internal
I dont get it, im also having same issues
Sorry for the late reply. This should be configured in network level, not the appwrite app level. Function containers should be connected to the external network directly.
Recommended threads
- Firebase app import
I'm **very** new to appwrite and I just set up appwrite with docker and I'm trying to import a Firebase app I have set up but it's erroring and I don't really k...
- Console infinite loading behind NginxPro...
Hi All, I am trying to get AppWrite to work behind NPM. I've followed the Medium guide to set proper headers, I've added my proxy configuration to NPM, and I ...
- Hi, I'm getting this error while deployi...
✗ Error • search (6937cb70002c2e9c1a97) • Fai ✗ Error: Deployment of search has failed. Check at https://cloud.appwrite.io/console/project-693...