Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app won't init #15

Closed
ghost opened this issue Jan 20, 2020 · 11 comments
Closed

app won't init #15

ghost opened this issue Jan 20, 2020 · 11 comments

Comments

@ghost
Copy link

ghost commented Jan 20, 2020

Hello,

I implemented the plugin and followed the instructions indicated (I added the instructions in the manifest and info.plist), after building the app, it presents the following error when I try to open:

Error connecting to the service protocol: failed to connect to http://127.0.0.1:62560/snSHEWFtsLw=/

Can you help me?

Thanks.

@raulbro
Copy link

raulbro commented Jan 27, 2020

Yeap I'm having the same problem, any fixes? @DennisAlund @suryaoddbit
@JulioBoffo were you able to fix it?

@ghost
Copy link
Author

ghost commented Jan 28, 2020

@raulbro not yet, I tried several tests, but all failed =/

@raulbro
Copy link

raulbro commented Jan 29, 2020

@JulioBoffo @DennisAlund @suryaoddbit Oh okay =/, lmk if you find anything, I will do the same. Looking at this issue #14 looks similar but ended up being an issue from another plugin.

@ghost
Copy link
Author

ghost commented Jan 29, 2020

@raulbro
I don't know if you've tried it, but we managed to build an android build on release in a windows environment, iOS managed a build without any problems by adding just the following code:

<key>FacebookAppID</key>
<string>[fbAppId]</string>
<key>FacebookDisplayName</key>
<string>[fbAppName]</string>

just below the array of CFBundleURLTypes.
You are now with our testing team to see if the plugin is working as it should. Try this to see if it will have the same result.

@DennisAlund
Copy link
Member

DennisAlund commented Jan 29, 2020

Sorry for late follow up. Have been preoccupied.

@JulioBoffo I'm not sure if I am reading wrong, but your code snippet looks like the one on the documentation on how to configure. Am I missing something that is different?

@raulbro
Copy link

raulbro commented Jan 29, 2020

@JulioBoffo Yeap I added those lines for iOS as the instructions show. Still having same error on android MacOS environment, any suggestions @DennisAlund ?

@DennisAlund
Copy link
Member

Can you try to use the plugin in isolation, without other plugins that might interfere? Just to narrow down where the cause of the problem is. If you can run it in isolation, you can add in other plugins to see if there's another plugin that's causing the violation (as some other bug reports were the case)

@ghost
Copy link
Author

ghost commented Jan 30, 2020

Sorry for late follow up. Have been preoccupied.

@JulioBoffo I'm not sure if I am reading wrong, but your code snippet looks like the one on the documentation on how to configure. Am I missing something that is different?

Hi @DennisAlund , to work on ios, i didn't put some lines that were in the documentation, because when i put them all, the app didn't build. These were the lines I ignored:

<array> <dict> <key>CFBundleURLSchemes</key> <array> <string>fb[APP_ID]</string> </array> </dict> </array>

About the test you asked us to do (use the isolated plugin), I already tried that. I downloaded your example from here on git and tried to build it, I had the same problem described on the 2 platforms. Any more suggestions? Thanks.

@DennisAlund
Copy link
Member

Thanks for the information. I'll have a look if our own applications are having some different setup that differs.

@ghost
Copy link
Author

ghost commented Feb 5, 2020

Guys, I managed to solve it here.

I moved the

        <android meta-data: name = "com.facebook.sdk.ApplicationId"
        android: value = "@ string / facebook_app_id" />

out of my app activity.
Staying like this:



    <application
        android: name = "io.flutter.app.FlutterApplication"
        android: label = "myAppName"
        android: icon = "@ mipmap / ic_launcher">
        <meta-data
            android: name = "com.google.firebase.messaging.default_notification_icon"
            android: resource = "@ mipmap / ic_icon_notif" />

        <android meta-data: name = "com.facebook.sdk.ApplicationId"
        android: value = "@ string / facebook_app_id" />
        <meta-data
            android: name = "com.facebook.sdk.CodelessDebugLogEnabled"
            android: value = "true" />

        <activity
            android: name = ". MainActivity"
            android: launchMode = "singleTop"
            android: theme = "@ style / LaunchTheme"
            android: configChanges = "orientation | keyboardHidden | keyboard | screenSize | locale | layoutDirection | fontScale | screenLayout | density | uiMode"
            android: hardwareAccelerated = "true"
            android: windowSoftInputMode = "adjustResize"> ....

With that built so much debug when release and we can already see the logs on the Facebook portal.

I hope I helped, thanks!

@DennisAlund
Copy link
Member

Yes, that's right. The

<meta-data
  android:name="com.facebook.sdk.ApplicationId"
  android:value="@string/facebook_app_id" />

Should be outside the <activity> tag. I can update and clarify that in the documentation. But it's definitely the correct place to place it.

Thanks for sharing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants