Below is common issues regarding to the FluxNews product and solutions to resolve the issues. Please try to download the latest version, some issues have been solved with the latest updates.


๐Ÿ’Š CompileDebug Android-R issue

  • Issue: Could not determine the dependencies of task โ€™:app_settings:compileDebugAidlโ€™. > Failed to find Platform SDK with path: platforms;android-R
  • Solution: Please follow this solution. If still not work, please creating another Flutter project with same project and Bundl name, then copy the Flutter folder from the new project to your current one.

๐Ÿ’Š CompileDebug โ€˜onRatingChangedโ€™, SmoothStarRating issue

  • Issue: when run a fluxstore, i get message error โ€˜onRatingChangedโ€™ and SmoothStarRating
  • Solution: please make sure to update the flutter to latest stable version and also clean up the cache, by using this guide

๐Ÿ’Š My images do not show up on the app

  • Issue: My images do not show up on the app.
  • Solution: It seems like this issue comes from the lack of several necessary plugins in your site. Please make sure that Better REST API Featured Images and Regenerate Thumbnails latest version are installed and enabled. Don't forget to run "Regenerate Thumbnails for Attachments" to make sure all of your set up are correct. Also refer to "4. Install Required plugins"

๐Ÿ’Š Unexpected Character (at character 1)

  • Issue: Login screen and SignUp screen shows this error Warning : FormatException , Unexpected Character (at character 1)
  • Solution: Fixed by changing the server url to https.

๐Ÿ’Š connect ECONNREFUSED 127.0.0.1:19001 issue

  • Issue: When we give build android command we are getting this error: connect ECONNREFUSED 127.0.0.1:19001 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
  • Solution: Please execute this:

    cd myproject
    expo start
    press control c to stop the metro bundler
    export EXPO_DEBUG=true
    expo build:android -t app-bundle

๐Ÿ’Š Login with firebase

  • Issue: I can't login/signup in FluxNews if I make my Firebase Project.
  • Solution: Create databases rules in firebase. This is the rule I applied in Firebase console under Database:

    rules_version = '2';
    service cloud.firestore {
    match /databases/{database}/documents {
      match /{document=**} {
        allow read, write: if request.auth.uid != null;
      }
    }
    }

๐Ÿ’Š rest_forbidden REST API 401

  • Issue: I have inspect the REST API for products endpoint it said โ€rest_forbiddenโ€, โ€œSorry, you are not allowed to do that.โ€ 401
  • Solution: Please add the following code on your htaccess file.

    RewriteCond %{HTTP:Authorization} ^(.) RewriteRule ^(.) - [E=HTTP_AUTHORIZATION:%1]


๐Ÿ’Š My colors are not fully displayed

Please add more colors according to your site/products in the file constant.dart (path: lib/common/constants/colors.dart) Refer image https://tppr.me/UUB82


๐Ÿ’Š My out of stock variable product is selectable unexpectedly

Make sure these 2 options of that particular product are selected https://tppr.me/o6dJO


๐Ÿ’Š Firebase Api PlatformException 10


๐Ÿ’Š Not find out the Get Dependencies

  • Issue: If the pubspect library is not setup correctly could cause following issues

    • I can not find out the Get dependencies or Packages get on the pubspec.yaml tab.
    • Error: Method not found: 'EdgeInsets.symmetric'.
  • Get more than 1K error from Dart Analysis
  • Solution: Select **Android Studio > Preferences ** and add the Flutter SDK path. (The Flutter SDK path is the location that you install Flutter environment).

    FDK path

    Then the Flutter command bar will display as below picture:

    Packages_get

    You can also install the library by run flutter pub get


๐Ÿ’Š AndroidManifest.xml is failed with onesignal

  • Issue: Below error pops up when compiling the android app in android studio:
Error: Attribute meta-data#onesignal_app_id at AndroidManifest.xml requires a placeholder substitution but no value for <onesignal_app_id> is provided.
  
Error: Attribute meta-data#onesignal_google_project_number at AndroidManifest.xml requires a placeholder substitution but no value for <onesignal_google_project_number> is provided.
  • Solution 1: pasted this code in build.gradle from app folder between defaultConfig braces:

    // One Signal:
    manifestPlaceholders = [onesignal_app_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    onesignal_google_project_number: "REMOTE"]
  • Solution 2: You can add the code below into your library build.gradle

    buildTypes {
    release {
    minifyEnabled false
    debuggable true
    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    signingConfig signingConfigs.awter
    manifestPlaceholders = [onesignal_app_id: "xxxxxxx",
    // Project number pulled from dashboard, local value is ignored.
    onesignal_google_project_number: "REMOTE"]
    }
    debug {
    manifestPlaceholders = [onesignal_app_id: "xxxxx",
    // Project number pulled from dashboard, local value is ignored.
    onesignal_google_project_number: "REMOTE"]
    }
    }
  • Solution 3: same as the Solution 2, but this line has to comment out:

    //signingConfig signingConfigs.awter

๐Ÿ’Š Dart process is locked

  • Issue: the app is lock when pressing the run button to start project.
Flutter packages get
Waiting for another flutter command to release the startup lock...
  • Solution: Go to your flutter folder /flutter/bin/cache/ and delete the lockfile file.

๐Ÿ’Š "Flutter is exited unexpectedly"

  • Issue: How to solve "Flutter is exited unexpectedly" when installing FluxNews on Windows?

    FluxStore_Windows_issue

  • Solution:

    • Step 1: Copy the source folder to another location.
    • Step 2: Delete the build folder in the source folder.
    • Step 3: In Android Studio, select File > Open > source folder in the new location > This Window.
    • Step 4: Press PLAY icon to install again.

๐Ÿ’Š Set German as default language

  • Issue: I have added a translation for German. How can I set German as default language?
  • Solution: please update the DefaultLanguage from common/config.dart

๐Ÿ’Š Login with SMS Login in Play Store?

  • Issue: After creating APK from FluxNews and releasing the app in Google Play Store (Basic for Android), I try to login with SMS Login, it shows error. When i try in Emulator device, SMS Login is working well.
  • Solution: Please go to the Google Play store and copy the SHA-1 key and past to your Firebase setting:

FDK path

FDK path


๐Ÿ’Š Build for iOS device?

  • Issue: Xcode couldn't find any iOS App Development provisioning profiles matching.

FDK path

  • Solution: Please use this command to create a key:

    keytool -genkey -v -keystore flutter_release_apk.jks -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

    Then match the created key with key.properties file.


๐Ÿ’Š How to change home style and main colour?

  • Issue: i'm failed in changing main color and changing the home design with my new one.
  • Solution: In the project /lib/config folder, we will find these below files: configar.json configen.json config_ja.json ........

    The configuration of all .json files has the same structure with the rest of the files that follow with configar.json, configes.json, etc.

These files correspond to the language. So if we only configure config_en.json and then select another language, it will look for the language in the rest of the files. So we must copy the configuration in the rest so that we can see the changes reflected.


๐Ÿ’Š Show Home screen in Arabic language?

  • Issue: Home Screen loads everything in english when switching to Arabic Language

    • Solution: you need to change changeLanguage function in lib/models/app.dart like this
  Future<bool> changeLanguage(String country, BuildContext context) async {
    try {
      SharedPreferences prefs = await SharedPreferences.getInstance();
      locale = country;
      await prefs.setString("language", country);
      await loadAppConfig();
      notifyListeners();
      await Provider.of<CategoryModel>(context, listen: false)
          .getCategories(lang: country);
      return true;
    } catch (err) {
      return false;
    }
  }

๐Ÿ’Š Throw exception when login sms ?

Issue: my SMS Login have issue with throw exception

Solution:

  • You need to create a project on firebase console.
  • Add an app for android and set package name, add fingerprint. You can check this link to know how to generate SHA1 https://developers.google.com/android/guides/client-auth
  • Download file google-services.json and put to android/app folder.