Skip to content

FlutterFlow 5.0.1 (& 5.0) unable to compile custom action code #3926

@Supertecnoboff

Description

@Supertecnoboff

Can we access your project?

  • I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.

Current Behavior

Whenever I try to compile custom action code in FlutterFlow, it does NOT work and also does not state what the code specific errors are. I get the following (general) error:

Unknown error compiling custom code. A common cause is a custom widget or action whose name in the code does not match the name provided in the editor.

Here is my code:

`// Automatic FlutterFlow imports
import '/backend/backend.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/actions/index.dart'; // Imports other custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom action code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!

Future getFirstString(String text) async {
// split string by empty spaces and get first string

List words = text.split(" ");
if (words.isNotEmpty) {
return words[0];
} else {
return "";
}
}`

Screenshot 2024-09-28 at 17 09 27

When pressing the Red Cross button, I get an empty list of code errors:

Screenshot 2024-09-28 at 17 12 39

Expected Behavior

  1. Create custom action.
  2. Write and save custom code.
  3. Compile with no errors (or if there are errors, provide me with a list of actual code errors).

Steps to Reproduce

  1. Open custom code editor section.
  2. Select "+ Add" button and select "Action".
  3. Write custom code and set name, return value and parameters.
  4. Save custom action.
  5. Compile custom action.

Reproducible from Blank

  • The steps to reproduce above start from a blank project.

Bug Report Code (Required)

IT48i87huJVNrsda1rrtbfpVniQUJj47bb8s1upuVUo8J5zKB+wAYvf7P1FWTL3id29AJU38knIz/Pfqv/DLE/oDAy6BG4c7yJNTFwrKWkGlVYTRO5GzfW1fJ+dRFVSj08OFqiUkLuhpZU4R3GaMe9yAfA/qK5jIDUcNLv21KdeK2SrDX1iXc2URm05KZDPz

Visual documentation

screen-recording-2024-09-28-at-171811_avMHvOwa.mp4

Environment

- FlutterFlow version: 5.0.1
- Platform: macOS Sequoia 15.0
- Browser name and version: FlutterFlow desktop app for macOS
- Operating system and version affected: macOS Sequoia 15.0

Additional Information

I am unable to compile any custom action code, it doesn't matter how simple or complex the code is, nothing complies.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions