Coder Social home page Coder Social logo

Comments (20)

Ulrar avatar Ulrar commented on August 24, 2024 1

Hey,

Sorry about the delay. I've updated the patch and the addon to build against the master branch, that should hopefully resolve your issue. If not, let me know.

from hassio-addons.

marecabo avatar marecabo commented on August 24, 2024

It looks like the default branch of librespot is 'dev' which might be less stable than 'master'? If this would be the case here, one could use git clone git://github.com/librespot-org/librespot.git --branch master --depth 1 /tmp/librespot. However, I have not tested if this is the cause.

from hassio-addons.

floodwayprintco avatar floodwayprintco commented on August 24, 2024

Thank you for your help. I ran that script and all looked good, no errors when I ran it. I restarted HA and tried to install Raspotify but am getting the same error:

Failed to install addon, Unknown Error, see logs

20-08-04 17:08:01 ERROR (SyncWorker_5) [supervisor.docker.addon] Can't build e4ac757a/armv7-addon-raspotify:dev: The command '/bin/bash -o pipefail -c git clone git://github.com/librespot-org/librespot.git /tmp/librespot && cd /tmp/librespot && git config --global user.name build && git config --global user.email "[email protected]" && git apply /tmp/metadata-pipe.patch' returned a non-zero code: 1

from hassio-addons.

Antexa avatar Antexa commented on August 24, 2024

Hey,

I try to build Raspotify today with your latest patch and it fail :


20-08-20 16:15:18 ERROR (SyncWorker_7) [supervisor.docker.addon] Can't build e4ac757a/armv7-addon-raspotify:dev: The command '/bin/bash -o pipefail -c ${BUILD_ARCH}-linux-gnu-strip /usr/bin/librespot' returned a non-zero code: 127
20-08-20 16:15:18 ERROR (MainThread) [asyncio] Task exception was never retrieved
future: <Task finished name='Task-103565' coro=<AddonManager.install() done, defined at /usr/src/supervisor/supervisor/addons/__init__.py:129> exception=AddonsError()>
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/docker/addon.py", line 394, in _build
    image, log = self.sys_docker.images.build(
  File "/usr/local/lib/python3.8/site-packages/docker/models/images.py", line 287, in build
    raise BuildError(chunk['error'], result_stream)
docker.errors.BuildError: The command '/bin/bash -o pipefail -c ${BUILD_ARCH}-linux-gnu-strip /usr/bin/librespot' returned a non-zero code: 127

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/addons/__init__.py", line 155, in install
    await addon.instance.install(store.version, store.image)
  File "/usr/src/supervisor/supervisor/utils/__init__.py", line 32, in wrap_api
    return await method(api, *args, **kwargs)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/supervisor/supervisor/docker/addon.py", line 381, in _install
    self._build(tag)
  File "/usr/src/supervisor/supervisor/docker/addon.py", line 405, in _build
    raise DockerAPIError()
supervisor.exceptions.DockerAPIError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/addons/__init__.py", line 158, in install
    raise AddonsError()
supervisor.exceptions.AddonsError

from hassio-addons.

Ulrar avatar Ulrar commented on August 24, 2024

from hassio-addons.

Antexa avatar Antexa commented on August 24, 2024

Hey,

What are you running this on, a pi4 ? Is it hassos or a supervised install?
Yes, PI4 2GB with supervised install

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.19.118-v7l+ #1311 SMP Mon Apr 27 14:26:42 BST 2020 armv7l GNU/Linux

Any chance you might have run out of ram during the build ?
I got 1 GB free in idle, It may enough ?

I can open a new issue, if this new one is not related to the previous one

from hassio-addons.

Antexa avatar Antexa commented on August 24, 2024

I tried to build locally through ssh and it seems that the var ${BUILD_ARCH} is not implemented :

Step 19/28 : RUN ${BUILD_ARCH}-linux-gnu-strip /usr/bin/librespot
 ---> Running in d0b769ce413b
/bin/bash: -linux-gnu-strip: command not found
The command '/bin/bash -o pipefail -c ${BUILD_ARCH}-linux-gnu-strip /usr/bin/librespot' returned a non-zero code: 127

from hassio-addons.

Ulrar avatar Ulrar commented on August 24, 2024

That doesn't seem right, that's should be defined by hassio when building. If you're building manually you need to pass it to docker build, in your case the value would be armv7.

I think the issue could be that debian (on which the image is based) doesn't use the name armv7, they use armhf I believe.
I don't have anything on that arch to test it but I suspect the binary might be named armhf-linux-gnu-strip, could you take a look on your side and see if you have a binary with that name or something similar ? If that's the case I can add a condition for that arch in the file and you'll be set.

Once the docker hub supports other archs, with any luck, I should be able to just have it build these, which should make all of this much easier for everyone.

from hassio-addons.

Antexa avatar Antexa commented on August 24, 2024

Hey,

I'm not sure on how to force this. Could you explain me the steps to achieve this ?

I try to set up the ARG in the Dockerfile, unfortunately this doesn't work.

ARG BUILD_ARCH=armhf

from hassio-addons.

Ulrar avatar Ulrar commented on August 24, 2024

from hassio-addons.

Antexa avatar Antexa commented on August 24, 2024

I can't get this works.

Something bothered me, when I try to build I notice that base-image is pulled. Why the base image (debian-base-armv7) in build.json is not used?

"armv7": "hassioaddons/debian-base-armv7:3.0.0",

Sending build context to Docker daemon  39.94kB
Step 1/28 : ARG BUILD_FROM=hassioaddons/debian-base:3.0.0
Step 2/28 : FROM ${BUILD_FROM} as base
 ---> a3d622ffc3f9
Step 3/28 : ARG BUILD_ARCH
 ---> Using cache
 ---> 24ad2531dfc7

from hassio-addons.

Ulrar avatar Ulrar commented on August 24, 2024

That's likely because you're running it manually, build.json is a hassio config file, not docker.

I've pushed a change to use arm-linux-gnu-strip on armv7, looking at this I'm hoping that's the one. To be safe I've added a ;true to it so even if that's not it, it should succeed. The binary will be a bit bigger but that shouldn't be an issue.
Could you refresh the repo and try ?

from hassio-addons.

Antexa avatar Antexa commented on August 24, 2024

This is working !! 👍

I think, I still have an issue with the ARG coming from my supervised install of Hassio.

from hassio-addons.

Ulrar avatar Ulrar commented on August 24, 2024

Great ! So you're able to use it now or is it failing with a new error ?

from hassio-addons.

Antexa avatar Antexa commented on August 24, 2024

I think it's correct (dunno nothing about raspotify features arg like linear volume, normalisation, ...) , however I got flooded with WARN like this one :

[2020-08-23T18:19:41Z WARN libmdns::fsm] couldn't parse packet from V4(172.30.32.1:5353): ReservedBitsAreNonZero

I give it a go with this config, this is the one your recommend ?

name: Raspotify
bitrate: 320
volume_normalisation: true
backend: pipe
username: **redacted**
password: **redacted**
device: /share/forked-daapd/music/Raspotify
metadata_pipe: /share/forked-daapd/music/Raspotify.metadata

from hassio-addons.

Ulrar avatar Ulrar commented on August 24, 2024

If you're using it with forked-daapd then yes, that'd be it. I don't use username / password myself but it should work either way.
As for the warning I'm not sure what that could be, hopefully it won't be an issue or we'll have to ask the librespot dev I suppose

from hassio-addons.

floodwayprintco avatar floodwayprintco commented on August 24, 2024

Hey,

Sorry about the delay. I've updated the patch and the addon to build against the master branch, that should hopefully resolve your issue. If not, let me know.

Just chiming in to say this worked for me, hooray and THANK YOU! This really helps tie my system together.

from hassio-addons.

Ulrar avatar Ulrar commented on August 24, 2024

Glad to hear it ! I'll probably have to use a specific commit as it'll likely break again when they update master, but we'll see when that happens.

Since this seems resolved for everyone I'll go ahead and close this, feel free to re-open if needed of course.

from hassio-addons.

amitkeret avatar amitkeret commented on August 24, 2024

Sorry to open this issue again...
I'm having similar issues where the installation fails.

Initially the error was for line 25:

The command '/bin/bash -o pipefail -c curl https://sh.rustup.rs -sSf | sh -s -- -y

Following this happening once, though, the error is now consistently on line 31:

The command '/bin/bash -o pipefail -c git clone git://github.com/librespot-org/librespot.git /tmp/librespot && cd /tmp/librespot && git checkout master && git config --global user.name build && git config --global user.email "[email protected]" && git apply /tmp/metadata-pipe.patch' returned a non-zero code: 1

I'm can't figure out the reason for this.
Any help will be appreciated. I'm this close to achieving multiroom Chromecast audio with your brilliant add-on!
Thanks

from hassio-addons.

keliam avatar keliam commented on August 24, 2024

Having the same issue as @amitkeret

from hassio-addons.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.