#Appwrite function returns incorrect context.req.path

3 messages Β· Page 1 of 1 (latest)

median blade
#

Since upgrading from Appwrite 1.6.0 to 1.6.1, when running a function locally for development using appwrite run functions --port 3001, the context.req.path is always returning /___vscode_livepreview_injected_script rather than the actual path.

Any thoughts why this is the case?

#
runtime  β”‚ entrypoint    β”‚ path                    β”‚ commands     β”‚ scopes
 ──────────┼───────────────┼─────────────────────────┼──────────────┼────────
  dart-3.5 β”‚ lib/main.dart β”‚ functions/api β”‚ dart pub get β”‚ []

β„Ή Info: If you wish to change your local settings, update the appwrite.json file and rerun the 'appwrite run' command.
β™₯ Hint: Permissions, events, CRON and timeouts dont apply when running locally.
β„Ή Info: Verifying Docker image ...
β„Ή Info: Building function using Docker ...
Preparing for build ...

Resolving dependencies...

Downloading packages...

+ async 2.13.0
+ boolean_selector 2.1.2
+ collection 1.19.1
+ matcher 0.12.17
+ meta 1.16.0
+ path 1.9.1
+ pub_semver 2.2.0
+ pubspec 2.3.0 (discontinued replaced by pubspec_parse)
+ quiver 3.2.2
+ source_span 1.10.1
+ stack_trace 1.12.1
+ stream_channel 2.1.4
+ string_scanner 1.4.1
+ term_glyph 1.2.2
+ test_api 0.7.4
+ uri 1.0.0
+ yaml 3.1.3

Changed 17 dependencies!
1 package is discontinued.
#
found user package appwrite_function_api

added user package as dependency to server.

Updated server import of user code

Building ...

Resolving dependencies...

Downloading packages...

+ async 2.13.0
+ collection 1.19.1
+ dart_appwrite 13.0.0
+ http 1.3.0
+ http_parser 4.1.2
+ lints 5.0.0 (5.1.1 available)
+ meta 1.16.0
+ path 1.9.1
+ source_span 1.10.1
+ string_scanner 1.4.1
+ term_glyph 1.2.2
+ typed_data 1.4.0
+ web 1.1.1

Changed 13 dependencies!

1 package has newer versions incompatible with dependency constraints.
Try `dart pub outdated` for more information.

Resolving dependencies...

Downloading packages...

+ appwrite_function_api 1.0.0 from path /usr/local/build
+ async 2.13.0
+ collection 1.19.1
+ dart_appwrite 13.0.0
+ http 1.3.0
+ http_parser 4.1.2
+ meta 1.16.0
+ path 1.9.1
+ shelf 1.4.2
+ source_span 1.10.1
+ stack_trace 1.12.1
+ stream_channel 2.1.4
+ string_scanner 1.4.1
+ term_glyph 1.2.2
+ typed_data 1.4.0
+ web 1.1.1

Changed 16 dependencies!

Compiling ...

Generated: /usr/local/server/server

Packing build ...

Build finished.

β„Ή Info: Starting function using Docker ...
β™₯ Hint: Function automatically restarts when you edit your code.
βœ“ Success: Visit http://localhost:3001/ to execute your function.
Preparing for start ...
Starting ...
HTTP server successfully started!
context.req.method=GET
context.req.path=/___vscode_livepreview_injected_script
ApiException: Invalid path. (400)