FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
113 stars 19 forks source link

Unknown error compiling custom code. #2232

Closed Bimsara132 closed 6 months ago

Bimsara132 commented 7 months ago

Has your issue been reported?

Current Behavior

I am not able to add custom widgets and actions to the flutter-flow app. it says that "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"

tried downloading the project, it's working while running in local. but the custom codes and widgets are not compiling in the flutter flow editor

Expected Behavior

so when added new custom widgets or actions it should compile.

Steps to Reproduce

Not able to compile the custom codes

Reproducible from Blank

Bug Report Code (Required)

FLUTTERFLOWUNKNOWNERROR

Context

When adding new custom widgets and custom actions

Screenshot 2024-01-24 at 19 13 51

Visual documentation

Screenshot 2024-01-24 at 19 14 39

Screenshot 2024-01-24 at 19 14 56

Screenshot 2024-01-24 at 19 15 12

Additional Info

No response

Environment

- FlutterFlow version: V4.0
- Platform: web, MacOS
- Browser name and version: Chrome Version 120.0.6099.234 (Official Build) (x86_64)
- Operating system and version affected: MacOS Sonoma 14.2.1 (23C71)
hariprasadms commented 7 months ago

@Bimsara132 - Thanks for reporting the issue. I have seen this error sometime but inconsistent.

SpeedotrackGPS commented 7 months ago

Hello, I am also getting the same issue while compiling the custom code but the same custom widget is getting compiled on a fresh project but cannot add to the existing project. Please let me know how to solve that

activeSergio commented 7 months ago

I have this error and my code does not contain errors, and i need to create urgently a component image

paulVu commented 7 months ago
Screenshot 2024-01-26 at 9 50 46 AM

I have the same problem.

paulVu commented 7 months ago

OMG, I'm deleted the custom widget but it's still in this issue.

Screenshot 2024-01-26 at 10 17 50 AM
paulVu commented 7 months ago

Also the app now can't deploy `Codemagic Deploy Output Failed Step: Install pods

┌─────────────────────────────────────────────────────────┐ │ A new version of Flutter is available! │ │ │ │ To update to the latest version, run "flutter upgrade". │ └─────────────────────────────────────────────────────────┘ Resolving dependencies...

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

Command

/Users/builder/.rbenv/versions/3.0.4/bin/pod install

Report

Stack

   CocoaPods : 1.13.0
        Ruby : ruby 3.0.4p208 (2022-04-12 revision 3fa771dded) [arm64-darwin21]
    RubyGems : 3.4.20
        Host : macOS 13.3.1 (22E261)
       Xcode : 14.2 (14C18)
         Git : git version 2.39.2
Ruby lib dir : /Users/builder/.rbenv/versions/3.0.4/lib
Repositories : master - git - https://github.com/CocoaPods/Specs.git @ 4419c469e56b99217ca68c65d9c895f83f7e8fed

Plugins

cocoapods-deintegrate : 1.0.5
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.1
cocoapods-trunk       : 1.6.0
cocoapods-try         : 1.2.0

Podfile

# Uncomment this line to define a global platform for your project
platform :ios, '13.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  pod 'GoogleUtilities'
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
      config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
        '$(inherited)',

        # dart: PermissionGroup.camera
        'PERMISSION_CAMERA=1',

        # dart: PermissionGroup.photos
        'PERMISSION_PHOTOS=1',

        # dart: PermissionGroup.microphone
        'PERMISSION_MICROPHONE=1',

        # dart: PermissionGroup.notification
        'PERMISSION_NOTIFICATIONS=1',
      ]
    end
  end
end

target 'ImageNotification' do
  use_frameworks!
  pod 'Firebase/Messaging'
  pod 'GoogleUtilities'
end

Error

RuntimeError - [Xcodeproj] Type checking error: got `PBXFileReference` for attribute: Attribute `files` (type: `to_many`, classes: `["PBXBuildFile"]`, owner class: `AbstractBuildPhase`)
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project/object_attributes.rb:142:in `validate_value'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project/object_list.rb:205:in `block in perform_additions_operations'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project/object_list.rb:202:in `each'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project/object_list.rb:202:in `perform_additions_operations'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project/object_list.rb:76:in `<<'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project/object.rb:301:in `block (2 levels) in configure_with_plist'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project/object.rb:299:in `each'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project/object.rb:299:in `block in configure_with_plist'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project/object.rb:296:in `each'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project/object.rb:296:in `configure_with_plist'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project.rb:272:in `new_from_plist'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project/object.rb:350:in `object_with_uuid'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project/object.rb:300:in `block (2 levels) in configure_with_plist'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project/object.rb:299:in `each'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project/object.rb:299:in `block in configure_with_plist'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project/object.rb:296:in `each'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project/object.rb:296:in `configure_with_plist'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project.rb:272:in `new_from_plist'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project/object.rb:350:in `object_with_uuid'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project/object.rb:300:in `block (2 levels) in configure_with_plist'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project/object.rb:299:in `each'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project/object.rb:299:in `block in configure_with_plist'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project/object.rb:296:in `each'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project/object.rb:296:in `configure_with_plist'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project.rb:272:in `new_from_plist'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project.rb:213:in `initialize_from_file'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/xcodeproj-1.23.0/lib/xcodeproj/project.rb:113:in `open'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.13.0/lib/cocoapods/installer/analyzer.rb:1194:in `block (2 levels) in inspect_targets_to_integrate'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.13.0/lib/cocoapods/installer/analyzer.rb:1193:in `each'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.13.0/lib/cocoapods/installer/analyzer.rb:1193:in `block in inspect_targets_to_integrate'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.13.0/lib/cocoapods/user_interface.rb:64:in `section'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.13.0/lib/cocoapods/installer/analyzer.rb:1188:in `inspect_targets_to_integrate'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.13.0/lib/cocoapods/installer/analyzer.rb:107:in `analyze'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.13.0/lib/cocoapods/installer.rb:422:in `analyze'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.13.0/lib/cocoapods/installer.rb:244:in `block in resolve_dependencies'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.13.0/lib/cocoapods/user_interface.rb:64:in `section'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.13.0/lib/cocoapods/installer.rb:243:in `resolve_dependencies'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.13.0/lib/cocoapods/installer.rb:162:in `install!'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.13.0/lib/cocoapods/command/install.rb:52:in `run'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.13.0/lib/cocoapods/command.rb:52:in `run'
/Users/builder/.rbenv/versions/3.0.4/lib/ruby/gems/3.0.0/gems/cocoapods-1.13.0/bin/pod:55:in `<top (required)>'
/Users/builder/.rbenv/versions/3.0.4/bin/pod:25:in `load'
/Users/builder/.rbenv/versions/3.0.4/bin/pod:25:in `<main>'

――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours: https://github.com/CocoaPods/CocoaPods/search?q=%5BXcodeproj%5D+Type+checking+error%3A+got+%60PBXFileReference%60+for+attribute%3A+Attribute+%60files%60+%28type%3A+%60to_many%60%2C+classes%3A+%60%5B%22PBXBuildFile%22%5D%60%2C+owner+class%3A+%60AbstractBuildPhase%60%29&type=Issues

If none exists, create a ticket, with the template displayed above, on: https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly submit a ticket: https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don't forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods...

Build failed :| Step 6 script Install pods exited with status code 1`

bbeckford commented 7 months ago

I'm also having this issue, really getting in the way of development now! Thanks

sharmilaccd commented 7 months ago

Facing the same issue... Hope this gets fixed soon!

Bimsara132 commented 7 months ago

inconsistent.

Hi @hariprasadms The issue is still there, not able to catch the error. because its not showing in the flutterflow.

treyhendon commented 7 months ago

Are you using custom Authentication by chance? If so, I noticed you listed 4.0 as your FlutterFlow version. The recent 4.1 update seems to have resolved my "silent" errors.

https://github.com/FlutterFlow/flutterflow-issues/issues/2152#issuecomment-1910870689

aemelyanovff commented 7 months ago

@bbeckford Please add a bug report code from anywhere in the project, otherwise we can't troubleshoot the issue.

bbeckford commented 7 months ago

@aemelyanovff Looks like this is fixed, thanks #2152

paulVu commented 7 months ago

It's fixed. But at the old project. You need to edit a custom function to compiling again. it's will solved.

Screenshot 2024-01-31 at 11 26 56 AM Screenshot 2024-01-31 at 11 27 10 AM
ChecoG88 commented 7 months ago

Hi, I'm having the same issue, but it haven't solved with the upgrade.

Captura de pantalla 2024-01-31 a la(s) 7 22 30 p m
aemelyanovff commented 6 months ago

Closing this issue as resolved.

Hi, I'm having the same issue, but it haven't solved with the upgrade.

@ChecoG88 Please create a new issue with a new bug report code. This seems to be something differently (unfortunately there's more than one reason why an "Unknown error compiling custom code" can occur.

ollosimango commented 5 days ago

I have a solution. place this in a stack with a PointerInterceptor (custom code) place the button on top of the custom widget and you will be able to click there