Flutter run failing in M1 MacBook Air

623 views
Skip to first unread message

Anurag Tyagi

unread,
Mar 28, 2021, 3:30:13 PM3/28/21
to Flutter Development (flutter-dev)
Hello, 
I have build an application using flutter on a linux based laptop but now I have shifted to M1 Mac. That same project has stopped working in this device.

When I run the flutter run command, I get an error. 

Error:
 flutter run

Downloading ios tools...                                            3.2s

Downloading ios-profile tools...                                    3.1s

Downloading ios-release tools...                                   16.8s

Multiple devices found:

Anurag’s iPhone (mobile)   • 00008030-0009201E3A3B802E            • ios • iOS

14.4.1

iPhone 12 Pro Max (mobile) • A3419601-EA49-4B7C-888D-BF0E0E4BA336 • ios •

com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)

[1]: Anurag’s iPhone (00008030-0009201E3A3B802E)

[2]: iPhone 12 Pro Max (A3419601-EA49-4B7C-888D-BF0E0E4BA336)

Please choose one (To quit, press "q/Q"): 1

Launching lib/main.dart on Anurag’s iPhone in debug mode...

Signing iOS app for device deployment using developer identity: "Apple

Development: anurag.t...@gmail.com (W9K6T9332L)"

Running Xcode build...                                                  

Xcode build done.                                            6.0s

Failed to build iOS app

Error output from Xcode build:

    objc[17097]: Class AMSupportURLConnectionDelegate is implemented in both ??

    (0x1fb7a4188) and ?? (0x118d9c2b8). One of the two will be used. Which one

    is undefined.

    objc[17097]: Class AMSupportURLSession is implemented in both ??

    (0x1fb7a41d8) and ?? (0x118d9c308). One of the two will be used. Which one

    is undefined.

    2021-03-29 00:58:24.605 xcodebuild[17097:755880]

    CFURLRequestSetHTTPCookieStorageAcceptPolicy_block_invoke: no longer

    implemented and should not be called

    ** BUILD FAILED **



Xcode's output:

    note: Using new build system

    note: Building targets in parallel

    note: Planning build

    note: Constructing build description

    error: Failed to create provisioning profile. There are no devices

    registered in your account on the developer website. Plug in and select a

    device to have Xcode register it. (in target 'Runner' from project 'Runner')

    error: No profiles for 'anurag-tyagi4964-gmail.com' were found: Xcode

    couldn't find any iOS App Development provisioning profiles matching

    'anurag-tyagi4964-gmail.com'. (in target 'Runner' from project 'Runner')


Could not build the precompiled application for the device.


Error launching application on Anurag’s iPhone.


Can anyone help and yeah the GitHub link to the project is :

https://github.com/WarMac4964/Shop_App

Suzuki Tomohiro

unread,
Mar 28, 2021, 3:42:37 PM3/28/21
to Anurag Tyagi, Flutter Development (flutter-dev)
Does that error message make sense to you?

There are no devices

    registered in your account on the developer website. Plug in and select a

    device to have Xcode register it. (in target 'Runner' from project 'Runner')

    error: No profiles for 'anurag-tyagi4964-gmail.com' were found: Xcode

    couldn't find any iOS App Development provisioning profiles matching

    'anurag-tyagi4964-gmail.com'. (in target 'Runner' from project 'Runner')


If not, please explain why this error is not applicable to you.

--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/b5ce4e2c-50c1-4818-8de8-f15fc8535699n%40googlegroups.com.
Message has been deleted

Anurag Tyagi

unread,
Mar 28, 2021, 11:41:45 PM3/28/21
to Flutter Development (flutter-dev)
That error came the First time because I used a physical device to run the app

Error: 

flutter run

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...

Running Xcode build...                                                  

Xcode build done.                                           10.5s

Failed to build iOS app

Error output from Xcode build:

    objc[1076]: Class AMSupportURLConnectionDelegate is implemented in both ??

    (0x1f3818188) and ?? (0x1142a42b8). One of the two will be used. Which one

    is undefined.

    objc[1076]: Class AMSupportURLSession is implemented in both ??

    (0x1f38181d8) and ?? (0x1142a4308). One of the two will be used. Which one

    is undefined.

    ** BUILD FAILED **



Xcode's output:

    /Applications/Development/flutter/.pub-cache/hosted/pub.dartlang.org/provide

    r-3.2.0/lib/src/delegate_widget.dart:194:18: Error: Superclass has no method

    named 'inheritFromElement'.

        return super.inheritFromElement(ancestor, aspect: aspect);

                     ^^^^^^^^^^^^^^^^^^

    /Applications/Development/flutter/.pub-cache/hosted/pub.dartlang.org/provide

    r-3.2.0/lib/src/provider.dart:259:19: Error: The method

    'inheritFromWidgetOfExactType' isn't defined for the class 'BuildContext'.

     - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart'

     ('/Applications/Development/flutter/packages/flutter/lib/src/widgets/framew

     ork.dart').

    Try correcting the name to the name of an existing method, or defining a

    method named 'inheritFromWidgetOfExactType'.

            ? context.inheritFromWidgetOfExactType(type) as InheritedProvider<T>

                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    /Applications/Development/flutter/.pub-cache/hosted/pub.dartlang.org/provide

    r-3.2.0/lib/src/provider.dart:260:19: Error: The method

    'ancestorInheritedElementForWidgetOfExactType' isn't defined for the class

    'BuildContext'.

     - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart'

     ('/Applications/Development/flutter/packages/flutter/lib/src/widgets/framew

     ork.dart').

    Try correcting the name to the name of an existing method, or defining a

    method named 'ancestorInheritedElementForWidgetOfExactType'.

            : context.ancestorInheritedElementForWidgetOfExactType(type)?.widget

                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


    Command PhaseScriptExecution failed with a nonzero exit code

    note: Using new build system

    note: Building targets in parallel

    note: Planning build

    note: Constructing build description


Could not build the application for the simulator.

Error launching application on iPhone 12 Pro Max.


Here, The same problem still exists and the problem with the device being registered was due to Xcode not being connected to internet while connecting the phone.

Same error arose on the physical device as well


flutter run

Multiple devices found:

Anurag’s iPhone (mobile)   • 00008030-0009201E3A3B802E            • ios • iOS

14.4.1

iPhone 12 Pro Max (mobile) • A3419601-EA49-4B7C-888D-BF0E0E4BA336 • ios •

com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)

[1]: Anurag’s iPhone (00008030-0009201E3A3B802E)

[2]: iPhone 12 Pro Max (A3419601-EA49-4B7C-888D-BF0E0E4BA336)

Please choose one (To quit, press "q/Q"): 1

Launching lib/main.dart on Anurag’s iPhone in debug mode...

Signing iOS app for device deployment using developer identity: "Apple

Development: anurag.t...@gmail.com (W9K6T9332L)"

Running Xcode build...                                                  

Xcode build done.                                            9.9s

Failed to build iOS app

Error output from Xcode build:

    objc[1261]: Class AMSupportURLConnectionDelegate is implemented in both ??

    (0x1f3818188) and ?? (0x1141a02b8). One of the two will be used. Which one

    is undefined.

    objc[1261]: Class AMSupportURLSession is implemented in both ??

    (0x1f38181d8) and ?? (0x1141a0308). One of the two will be used. Which one

    is undefined.

    2021-03-29 09:08:00.380 xcodebuild[1261:57267]

    CFURLRequestSetHTTPCookieStorageAcceptPolicy_block_invoke: no longer

    implemented and should not be called

    ** BUILD FAILED **



Xcode's output:

    /Applications/Development/flutter/.pub-cache/hosted/pub.dartlang.org/provide

    r-3.2.0/lib/src/delegate_widget.dart:194:18: Error: Superclass has no method

    named 'inheritFromElement'.

        return super.inheritFromElement(ancestor, aspect: aspect);

                     ^^^^^^^^^^^^^^^^^^

    /Applications/Development/flutter/.pub-cache/hosted/pub.dartlang.org/provide

    r-3.2.0/lib/src/provider.dart:259:19: Error: The method

    'inheritFromWidgetOfExactType' isn't defined for the class 'BuildContext'.

     - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart'

     ('/Applications/Development/flutter/packages/flutter/lib/src/widgets/framew

     ork.dart').

    Try correcting the name to the name of an existing method, or defining a

    method named 'inheritFromWidgetOfExactType'.

            ? context.inheritFromWidgetOfExactType(type) as InheritedProvider<T>

                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    /Applications/Development/flutter/.pub-cache/hosted/pub.dartlang.org/provide

    r-3.2.0/lib/src/provider.dart:260:19: Error: The method

    'ancestorInheritedElementForWidgetOfExactType' isn't defined for the class

    'BuildContext'.

     - 'BuildContext' is from 'package:flutter/src/widgets/framework.dart'

     ('/Applications/Development/flutter/packages/flutter/lib/src/widgets/framew

     ork.dart').

    Try correcting the name to the name of an existing method, or defining a

    method named 'ancestorInheritedElementForWidgetOfExactType'.

            : context.ancestorInheritedElementForWidgetOfExactType(type)?.widget

                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


    Command PhaseScriptExecution failed with a nonzero exit code

    note: Using new build system

    note: Building targets in parallel

    note: Planning build

    note: Constructing build description


Could not build the precompiled application for the device.


Error launching application on Anurag’s iPhone.


Also I would like you to know that the project was functional on the laptop running linux.

Reply all
Reply to author
Forward
0 new messages