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

[Bug]: Getting error after adding "facebook_app_events: ^0.14.8" into my project #200

Closed
1 task done
sreeraj43 opened this issue Jan 18, 2022 · 13 comments
Closed
1 task done
Labels
bug🐞 Something isn't working

Comments

@sreeraj43
Copy link

sreeraj43 commented Jan 18, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Currently getting error while running the project
appevents_issue

Expected Behavior

Need to run the project without errors

Steps To Reproduce

  1. Added facebook_app_events: ^0.14.8 in my pubspec.yaml
  2. Executed "flutter pub get" and "flutter doctor" successfully
  3. Then I tried to run the project and getting error, please find the attachment below
    appevents_issue

Platform

No response

Flutter Doctor

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.19042.1466], locale en-GB)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0-rc3)
[√] Chrome - develop for the web
[√] Android Studio (version 4.1.0)
[√] Connected device (3 available)
@sreeraj43 sreeraj43 added the bug🐞 Something isn't working label Jan 18, 2022
@ferysyukur
Copy link
Contributor

Hi @sreeraj43, I tried to reproduce that error and still couldn't get the error. I think it's because the server get error 502.
Please try to use flutter clean first and rerun the project.

@sreeraj43
Copy link
Author

Iam already run the flutter clean command successfully, but there is no use still getting the same error, please give me a solution for this

@ferysyukur
Copy link
Contributor

ferysyukur commented Jan 19, 2022

Could you upgrade your flutter ?

  • flutter upgrade
  • flutter clean
  • running the apps

or you can see this way
transistorsoft/flutter_background_fetch#256 (comment)

@Ayman-Barghout
Copy link

I am facing the same issue, when I specify the version of Facebook SDK in build.gradle to the latest 12.3.0 I don't get the error anymore and the app builds successfully.
I will open a PR.

@sreeraj43
Copy link
Author

@Ayman-Barghout still getting the same error after I added latest facebook SDK into my build.gradle

@Ayman-Barghout
Copy link

@sreeraj43 the PR is not merged yet, you can use the package from GitHub until it gets merged, at least that's what we are doing.

In pubspec.yaml:

  # FIX-ME: Switch to hosted dependency when PR https://github.com/oddbit/flutter_facebook_app_events/pull/201 is merged and published
  facebook_app_events:
    git: https://github.com/doneservices/flutter_facebook_app_events

@DennisAlund
Copy link
Member

Please see comments on PR #201

@DennisAlund
Copy link
Member

DennisAlund commented Jan 31, 2022

I am facing the same issue, when I specify the version of Facebook SDK in build.gradle to the latest 12.3.0 I don't get the error anymore and the app builds successfully.

  1. Please confirm what version your setup resolves to if you keep 12.+ as the current code is setup to do.
  2. Please check if your code keeps working if you revert back your explicit 12.3.0 to 12.+. Then your repo dependency was likely stuck on a version... a clean build/install should also have helped
  3. Please provide information about other Facebook depending plugins you are using

@Ayman-Barghout
Copy link

I am facing the same issue, when I specify the version of Facebook SDK in build.gradle to the latest 12.3.0 I don't get the error anymore and the app builds successfully.

  1. Please confirm what version your setup resolves to if you keep 12.+ as the current code is setup to do.
  2. Please check if your code keeps working if you revert back your explicit 12.3.0 to 12.+. Then your repo dependency was likely stuck on a version... a clean build/install should also have helped
  3. Please provide information about other Facebook depending plugins you are using

Thanks for the reply and interest.

  1. It couldn't be resolved, I got a Could not resolve com.facebook.android:facebook-android-sdk:12.+..
  2. I checked and it fails everytime I use 12.+ instead of the explicit version.
  3. I am not currently using any Facebook-dependent plugins in my app aside from facebook_app_events.

@DennisAlund
Copy link
Member

DennisAlund commented Jan 31, 2022

It's better to keep a non-explicit version with major release range to make compatible with potential other plugins using the Facebook SDK.

Seems that it could be that the 12.+ version syntax isn't supported, should be [12.0,13.0)
https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm#MAVEN402

@Ayman-Barghout
Copy link

It's better to keep a non-explicit version with major release range to make compatible with potential other plugins using the Facebook SDK.

Seems that it could be that the 12.+ version syntax isn't supported, should be [12.0,13.0) docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm#MAVEN402

For some reason even this syntax "[12.0,13.0]" doesn't work in my project, I will investigate further and reply to the comments on the PR soon - sorry, been busy since yesterday -, also creating a new flutter project, it works perfectly with ^0.14.8, so it might be conflicting dependency or something else causing this but specifying a certain version fixes it, it'd be great if someone has a better idea of what might be causing this.

@Raziel619
Copy link

Heya, I am also experiencing this issue on 0.15.0
Could not resolve com.facebook.android:facebook-android-sdk:12.+.

I've been using my own fork to mitigate this issue but would rather switch back to the official plugin

facebook_app_events:
git:
url: git://github.com/Raziel619/flutter_facebook_app_events
ref: develop

@DennisAlund
Copy link
Member

At the moment of writing the current version is 0.16. Please update your version and open the issue again if the problem is still around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug🐞 Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants