Skip to content
Back

context.log() and context.error() don't work for Dart 3.5 functions?

  • 0
  • Cloud
tap2sleep
19 Sep, 2025, 07:06

NoSuchMethodError: Class 'RuntimeContext' has no instance method 'error'. Receiver: Instance of 'RuntimeContext' Tried calling: error("Error: ", "NoSuchMethodError: Class 'RuntimeContext' has no instance method 'log'.\nReceiver: Instance of 'RuntimeContext'\nTried calling: log(Updated row count:, 31)") #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:38) #1 _objectNoSuchMethod (dart:core-patch/object_patch.dart:85) #2 main (package:set_shop_and_line/main.dart:49) <asynchronous suspension> #3 Future.any.onValue (dart:async/future.dart:628) <asynchronous suspension>

The code works if I remove the logging. https://appwrite.io/docs/products/functions/develop#logging

TL;DR
context.log() and context.error() not working for Dart 3.5 functions; NoSuchMethodError for 'error' and 'log'. Works when logging is removed. Solution: Check documentation for the correct syntax for logging in Dart 3.5 functions.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more