foss42 / apidash

API Dash is a beautiful open-source cross-platform API Client built using Flutter which can help you easily create & customize your API requests, visually inspect responses and generate API integration code. A lightweight alternative to postman/insomnia.
https://apidash.dev
Apache License 2.0
1.37k stars 257 forks source link

Building API Dash on Ubuntu Fails #385

Closed AcousticDeveloper closed 2 months ago

AcousticDeveloper commented 2 months ago

Describe the bug/problem Trying to build apidash on a fresh install of Ubuntu fails.

Screenshot 2024-04-27 093128

This issue does not seem to be with my local flutter installation or any other components because a new flutter application runs without any error.

image

The issue can be due to mdk-sdk which has a build failure to the current master branch (though mentions in the commit that it is not released) which comes from fvp where version 0.16.0 mentions for preparing ffmpeg 7.0 (but currently listed version in pubspec.yaml is ^0.14.0), so that might be a reason for this issue.

I think the issue is due to mdk-sdk because flutter run downloads the nightly build of the software.

Screenshot 2024-04-27 113416

Running flutter run with -v flag outputs the following (please note this is not the complete output, rather the part where the build fails)

Screenshot 2024-04-27 114333

For testing purposes, I've tried to manually install ffmpeg using sudo snap install ffmpeg which installs version 4.3.1, but still the error remained.

Steps to Reproduce the bug/problem

  1. Install a fresh Ubuntu 22.04 on WSL2 on Windows 11.
  2. Install flutter using snap by running the following command sudo snap install flutter --classic.
  3. Setup SSH key for git with Ubuntu.
  4. Fork and clone apidash.
  5. Install linux compilation tools as mentioned in the documentation.
  6. Run flutter create --platforms=linux . to setup flutter for linux.
  7. Run flutter run.

Expected behavior It should build successfully, and a new window with apidash shall open.

Device Info (The device where you encountered this issue):

AcousticDeveloper commented 2 months ago

I am able to solve this issue, seems like the version 0.14.0 of fvp was causing the problem. Bumping up the version to 0.17.0 using flutter pub upgrade --major-versions fvp resolved the issue.

image

After that, flutter run works perfectly fine.

image