Skip to content

Test Mode codegen fails with “Null check operator used on a null value” while Run/TestFlight work correctly #7158

@Shoot-Park

Description

@Shoot-Park

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

Project name: SHOOTPARK

Current behavior:
FlutterFlow Test Mode always fails with:

“Codegen failed: Null check operator used on a null value”

Stack trace points to:
FFCodeGenerator.requiredImports
WidgetClassFilesGenerator.generateImportCode

Important:

  • Run Mode works correctly
  • iOS build/TestFlight builds successfully
  • APK/real builds compile correctly
  • App works on physical devices

The issue only affects FlutterFlow Test Mode.

What I already tried:

  • Removed custom actions
  • Removed action blocks
  • Checked all parameters
  • Rebuilt actions
  • Cleared browser cache
  • Restarted FlutterFlow
  • Reopened project
  • Fixed all visible errors/warnings
  • Verified imports and Firebase references

No visible project errors remain.

The project still compiles successfully outside Test Mode, which suggests corrupted/generated metadata or a Test Mode codegen issue rather than invalid Flutter code.

Expected Behavior

Test Mode should generate code and launch correctly, exactly like Run Mode and production/TestFlight builds.

Steps to Reproduce

  1. Open the FlutterFlow project “SHOOTPARK”
  2. Launch Test Mode
  3. Code generation starts
  4. Test Mode fails immediately with:
    “Null check operator used on a null value”

Additional information:

  • Run Mode works correctly
  • TestFlight/iOS builds succeed
  • Real device builds work correctly
  • The issue only affects FlutterFlow Test Mode/codegen

The issue started after modifications involving:

  • RevenueCat premium logic
  • Custom actions
  • Component/page state variables
  • C50 session management system

Even after removing problematic actions and fixing visible errors, Test Mode still fails.

Reproducible from Blank

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

Bug Report Code (Required)

Nothing

Visual documentation

Image

Environment

- FlutterFlow version: 
- Platform:
- Browser name and version:
- Operating system and version affected:

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs triageA potential issue that has not been confirmed as a bug.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions