FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
121 stars 18 forks source link

Local Run android device won't complete #3490

Closed esl417 closed 2 months ago

esl417 commented 2 months ago

Can we access your project?

Current Behavior

I installed the flutter SDK yesterday July 25 along with the other programs needed to run a local run on my device (galaxy s23). When I select my device to run a test on, it gets near completion but gives the following error (I'll paste in it's entirety, but error at the end):

Launching lib\main.dart on SM S911U1 in debug mode... Upgrading build.gradle Running Gradle task 'assembleDebug'...
Warning: This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times. Invalid depfile: C:\Users\erics\AppData\Roaming\FlutterFlow\flutterflow\s_c_u_b_azen.dart_tool\flutter_build\d9f4f3c9bc3fe1c7f1a70d3deeb1f8d3\kernel_snapshot.d Invalid depfile: C:\Users\erics\AppData\Roaming\FlutterFlow\flutterflow\s_c_u_b_azen.dart_tool\flutter_build\d9f4f3c9bc3fe1c7f1a70d3deeb1f8d3\kernel_snapshot.d lib/custom_code/actions/generate_and_download_csv.dart:56:21: Error: Method not found: 'Blob'. final blob = html.Blob([bytes]); ^^^^ lib/custom_code/actions/generate_and_download_csv.dart:57:20: Error: Undefined name 'Url'. final url = html.Url.createObjectUrlFromBlob(blob); ^^^ lib/custom_code/actions/generate_and_download_csv.dart:60:23: Error: Undefined name 'document'. final anchor = html.document.createElement('a') as html.AnchorElement ^^^^^^^^ lib/custom_code/actions/generate_and_download_csv.dart:60:59: Error: 'AnchorElement' isn't a type. final anchor = html.document.createElement('a') as html.AnchorElement ^^^^^^^^^^^^^ lib/custom_code/actions/generate_and_download_csv.dart:72:8: Error: Undefined name 'document'. html.document.body?.children.add(anchor); ^^^^^^^^ lib/custom_code/actions/generate_and_download_csv.dart:74:8: Error: Undefined name 'document'. html.document.body?.children.remove(anchor); ^^^^^^^^ lib/custom_code/actions/generate_and_download_csv.dart:75:8: Error: Undefined name 'Url'. html.Url.revokeObjectUrl(url); ^^^ Unhandled exception: FileSystemException(uri=org-dartlang-untranslatable-uri:dart%3Ahtml; message=StandardFileSystem only supports file: and data: URIs)

0 StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:34)

1 asFileUri (package:vm/kernel_front_end.dart:752)

2 writeDepfile (package:vm/kernel_front_end.dart:892)

#3 FrontendCompiler.compile (package:frontend_server/frontend_server.dart:680) #4 starter (package:frontend_server/starter.dart:101) #5 main (file:///C:/b/s/w/ir/x/w/sdk/pkg/frontend_server/bin/frontend_server_starter.dart:13) Target kernel_snapshot failed: Exception FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'. > Process 'command 'C:\Users\erics\AppData\Roaming\FlutterFlow\flutterflow\flutter\bin\flutter.bat'' finished with non-zero exit value 1 * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 43s Running Gradle task 'assembleDebug'... 44.0s Error: Gradle task assembleDebug failed with exit code 1 ### Expected Behavior Expected to have a local copy of my app run on my device so that I can test it. ### Steps to Reproduce 1. in the windows desktop flutterflow, click down arrow next to the testing lighning bolt 2. install the Flutter SDK through the local run set up wizard 3. Once set up wizard complete, click scan for devices 4. select Galaxy S23 device 5. Initiate local run test by hitting the play button ![Screenshot 2024-07-26 093709](https://github.com/user-attachments/assets/cf0ad6ce-d94f-494b-a8a1-85a9a35e6de1) ### Reproducible from Blank - [ ] The steps to reproduce above start from a blank project. ### Bug Report Code (Required) IT40heflxItIpbxZ+Kr9bfpajic5KUR6a4IFlcJBaCosfZT2BLMcec/RVERCOLC/Sgk7fE79o2oW0t76hs7xM/FdIU+CRtxxys5icRfwWmKhVJiDFJWgSXFCL+1nCGnH17Snux4lWepfSnwuwzuuCtmvQhbcNJi3OTASDq/LZO4= ### Visual documentation https://github.com/user-attachments/assets/9b7e8072-62f6-4bcd-b0a2-57f1c4483295 ### Environment ```markdown - FlutterFlow version: 4.1.77+ - Platform: Desktop - Browser name and version: Chrome 126.0.6478.128 (Official Build) (64-bit) - Operating system and version affected: Windows 11 Home 64 bit ``` ### Additional Information _No response_
paulperez-dev commented 2 months ago

Hi @esl417! This is not a bug, your custom function generate_and_download_csv.dart imports dart:html which only run on web apps.

Try selecting a browser as a run device.
I'm closing this issue.