skip to Main Content

I am trying to run the example initialization of Couchbase Lite found at: https://cbl-dart.dev/install/. However, I keep getting this error on running and no one on Stack Overflow seems to have had it before:

Launching libmain.dart on sdk gphone64 x86 64 in debug mode...
Running Gradle task 'assembleDebug'...
Installing native libraries for Couchbase Lite for android
Error in line 124 in file ./tool/install_libraries.sh

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':cbl_flutter_ce:installLibraries'.
> Process 'command 'C:/Program Files/Git/bin/bash'' finished with non-zero exit value 35

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 31s
Exception: Gradle task assembleDebug failed with exit code 1

I am using Flutter in Android Studio. My code consists of the boilerplate Flutter app given when you make a new Flutter project, with only this change made to my main.dart file:

import 'package:flutter/material.dart';
import 'package:cbl_flutter/cbl_flutter.dart';
import 'package:cbl_flutter_ce/cbl_flutter_ce.dart';

Future<void> main() async {
  await CouchbaseLiteFlutter.init();
  runApp(const MyApp());
}

I have furthermore added C:/Program Files/Git/bin/bash to my PATH variables to no avail, in both the system and user variables sections. As a final comment, I checked line 124 in file ./tool/install_libraries.sh mentioned in the error, also to no avail; it only contains the following (I am not too familiar with .sh files):

curl "$(
    _couchbaseLiteCDownloadUrl 
        "$COUCHBASE_EDITION" 
        "$COUCHBASE_LITE_C_RELEASE" 
        "$target"
)" 
    --silent 
    --fail 
    --retry 5 
    --retry-max-time 30 
    --output "$couchbaseLiteCArchiveFile"

Any help would be appreciated!

2

Answers


  1. Chosen as BEST ANSWER

    Solved! I was not able to solve my issue with just updating curl, unfortunately. What did work was implementing the fix proposed by this pull request: github pull request. According to the person who posted the pull request:

    Couchbase url certificate changed to self-signed. It was throwing certificate error while installing libraries, couchbase made some changes in their certificate.

    Implementing the same fix as suggested by the open pull request, which was simply to add two '-k' flags (specifically in lines 125 and 138) in the install_libraries.sh script, eliminated the error for me. More info on what that does here: what does '-k' do. Screenshot of the pull request below:

    screenshot


  2. There’s a bug in curl 8.4

    see https://github.com/aws/aws-sdk-cpp/pull/2811/files that gives a work-around and a link to the bug. The work-around is to install and use curl 8.5

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search