Results 1 to 9 of 9

Thread: Rhythmbox won't sync to phone - "Could not open resource for writing"

  1. #1

    Default Rhythmbox won't sync to phone - "Could not open resource for writing"

    I don't know what broke and when, but I've previously used Rhythmbox to sync music to my Android phone using MTP, but now it refuses to work and gives the error "Could not open resource for writing". Syncing will delete tracks without a problem, and I can copy files to the phone using Nautilus, but from the logging then it seems that something broke in GStreamer.

    If I run "rhythmbox -d" then I get a long log including this section:
    Code:
    (20:01:36) [0x55f4fb2236d0] [build_sync_itinerary] rb-sync-state.c:286: building itinerary hash
    (20:01:36) [0x55f4fb2236d0] [build_sync_itinerary] rb-sync-state.c:301: adding selected playlists to the itinerary
    (20:01:36) [0x55f4fb2236d0] [itinerary_insert_some_playlists] rb-sync-state.c:229: adding entries from playlist Test to itinerary
    (20:01:36) [0x55f4fb2236d0] [build_sync_itinerary] rb-sync-state.c:324: finished building itinerary hash; has 1 entries
    (20:01:36) [0x55f4fb2236d0] [build_device_state] rb-sync-state.c:334: building device contents hash
    (20:01:36) [0x55f4fb2236d0] [build_device_state] rb-sync-state.c:338: getting music entries from device
    (20:01:36) [0x55f4fb2236d0] [build_device_state] rb-sync-state.c:349: done getting music entries from device
    (20:01:36) [0x55f4fb2236d0] [build_device_state] rb-sync-state.c:351: getting podcast entries from device
    (20:01:36) [0x55f4fb2236d0] [build_device_state] rb-sync-state.c:361: done getting podcast entries from device
    (20:01:36) [0x55f4fb2236d0] [build_device_state] rb-sync-state.c:363: done building device contents hash; has 0 entries
    (20:01:36) [0x55f4fb2236d0] [rb_sync_state_update] rb-sync-state.c:385: building list of files to transfer to device
    (20:01:36) [0x55f4fb2236d0] [build_sync_list_cb] rb-sync-state.c:162: adding file:///home/ibboard/Music/Plastique%20Noir/24%20Hours%20Awake/4%20-%20Negatives.m4a (3285614 bytes); id 5762d618883f22aaf1df35758c8d5aba to sync list
    (20:01:36) [0x55f4fb2236d0] [rb_sync_state_update] rb-sync-state.c:394: decided to transfer 1 files (3285614 bytes) to the device
    (20:01:36) [0x55f4fb2236d0] [rb_sync_state_update] rb-sync-state.c:397: building list of files to remove from device
    (20:01:36) [0x55f4fb2236d0] [rb_sync_state_update] rb-sync-state.c:406: decided to remove 0 files (3285614 bytes) from the device
    (20:01:36) [0x55f4fb2236d0] [rb_sync_state_update] rb-sync-state.c:409: keeping 0 files on the device
    (20:01:36) [0x55f4fb2236d0] [rb_sync_state_update] rb-sync-state.c:428: current space used: 16078114816 bytes; adding 3285614, removing 0
    (20:01:36) [0x55f4fb2236d0] [rb_sync_state_update] rb-sync-state.c:430: space used after sync: 16081400430 bytes
    (20:01:36) [0x55f4fb2236d0] [sync_idle_cb_update_sync] rb-media-player-source.c:946: sync settings are acceptable
    (20:01:36) [0x55f4fb2236d0] [sync_idle_delete_entries] rb-media-player-source.c:954: deleting 0 files from media player
    (20:01:36) [0x55f4fb2236d0] [sync_delete_done_cb] rb-media-player-source.c:760: finished deleting 0 files from media player
    (20:01:36) [0x55f4fb2236d0] [sync_delete_done_cb] rb-media-player-source.c:766: transferring 1 files to media player
    (20:01:36) [0x55f4fb2236d0] [rhythmdb_query_model_chain] rhythmdb-query-model.c:920: query model 0x55f4fdc9c240 chaining to base model (nil)
    (20:01:36) [0x55f4fb2236d0] [rhythmdb_read_enter] rhythmdb.c:1249: counter: 1
    (20:01:36) [0x55f4fb2236d0] [rhythmdb_query_internal] rhythmdb.c:4212: doing query
    (20:01:36) [0x55f4fb2236d0] [do_query_recurse] rhythmdb-tree.c:2339: doing recursive query, 1 conjunctions
    (20:01:36) [0x55f4fb2236d0] [rhythmdb_query_model_add_results] rhythmdb-query-model.c:2269: adding 0 entries
    (20:01:36) [0x55f4fb2236d0] [idle_process_update] rhythmdb-query-model.c:1208: inserting 0 rows
    (20:01:36) [0x55f4fb2236d0] [rhythmdb_query_internal] rhythmdb.c:4218: completed
    (20:01:36) [0x55f4fb2236d0] [rb_transfer_target_transfer] rb-transfer-target.c:425: pasting entry file:///home/ibboard/Music/Plastique%20Noir/24%20Hours%20Awake/4%20-%20Negatives.m4a
    (20:01:36) [0x55f4fb2236d0] [rb_track_transfer_batch_check_profiles] rb-track-transfer-batch.c:289: checking profiles
    (20:01:36) [0x55f4fb2236d0] [impl_get_missing_plugins] rb-encoder-gst.c:739: trying to check profile m4a for missing plugins
    (20:01:36) [0x55f4fb2236d0] [impl_get_missing_plugins] rb-encoder-gst.c:766: got request pad, profile m4a works
    (20:01:36) [0x55f4fb2236d0] [impl_get_missing_plugins] rb-encoder-gst.c:780: encoder found, profile m4a works
    (20:01:36) [0x55f4fb2236d0] [impl_get_missing_plugins] rb-encoder-gst.c:739: trying to check profile oggvorbis for missing plugins
    (20:01:36) [0x55f4fb2236d0] [impl_get_missing_plugins] rb-encoder-gst.c:766: got request pad, profile oggvorbis works
    (20:01:36) [0x55f4fb2236d0] [impl_get_missing_plugins] rb-encoder-gst.c:780: encoder found, profile oggvorbis works
    (20:01:36) [0x55f4fb2236d0] [impl_get_missing_plugins] rb-encoder-gst.c:739: trying to check profile mp3 for missing plugins
    (20:01:36) [0x55f4fb2236d0] [impl_get_missing_plugins] rb-encoder-gst.c:766: got request pad, profile mp3 works
    (20:01:36) [0x55f4fb2236d0] [impl_get_missing_plugins] rb-encoder-gst.c:780: encoder found, profile mp3 works
    (20:01:36) [0x55f4fb2236d0] [rb_track_transfer_batch_check_profiles] rb-track-transfer-batch.c:308: have 0 profiles with missing plugins
    (20:01:36) [0x55f4fb2236d0] [select_profile_for_entry] rb-track-transfer-batch.c:243: can use source encoding audio/x-aac
    (20:01:36) [0x55f4fb2236d0] [select_profile_for_entry] rb-track-transfer-batch.c:252: can use lossy encoding audio/x-vorbis
    (20:01:36) [0x55f4fb2236d0] [select_profile_for_entry] rb-track-transfer-batch.c:252: can use lossy encoding audio/mpeg
    (20:01:36) [0x55f4fb2236d0] [select_profile_for_entry] rb-track-transfer-batch.c:239: don't want lossless encoding audio/x-flac
    (20:01:36) [0x55f4fb2236d0] [rb_track_transfer_batch_check_profiles] rb-track-transfer-batch.c:321: copying entry file:///home/ibboard/Music/Plastique%20Noir/24%20Hours%20Awake/4%20-%20Negatives.m4a
    (20:01:36) [0x55f4fb2236d0] [start_next] rb-track-transfer-batch.c:675: 1 entries remain in the batch
    (20:01:36) [0x55f4fb2236d0] [start_next] rb-track-transfer-batch.c:692: attempting to transfer file:///home/ibboard/Music/Plastique%20Noir/24%20Hours%20Awake/4%20-%20Negatives.m4a
    (20:01:36) [0x55f4fb2236d0] [select_profile_for_entry] rb-track-transfer-batch.c:243: can use source encoding audio/x-aac
    (20:01:36) [0x55f4fb2236d0] [select_profile_for_entry] rb-track-transfer-batch.c:252: can use lossy encoding audio/x-vorbis
    (20:01:36) [0x55f4fb2236d0] [select_profile_for_entry] rb-track-transfer-batch.c:252: can use lossy encoding audio/mpeg
    (20:01:36) [0x55f4fb2236d0] [select_profile_for_entry] rb-track-transfer-batch.c:239: don't want lossless encoding audio/x-flac
    (20:01:36) [0x55f4fb2236d0] [rb_transfer_target_build_dest_uri] rb-transfer-target.c:94: built dest uri for media type 'audio/x-aac', extension 'm4a': mtp://%5Busb%3A003,006%5D/Internal%20shared%20storage/Music/Plastique%20Noir/24%20Hours%20Awake/04%20-%20Negatives.m4a
    (20:01:36) [0x55f4fcba10f0] [create_parent_dirs_task] rb-track-transfer-batch.c:620: creating parent dirs for mtp://%5Busb%3A003,006%5D/Internal%20shared%20storage/Music/Plastique%20Noir/24%20Hours%20Awake/04%20-%20Negatives.m4a
    (20:01:36) [0x55f4fb2236d0] [maybe_expand_container] rb-grilo-source.c:1104: not expanding, nothing to expand
    (20:01:36) [0x55f4fb2236d0] [maybe_expand_container] rb-grilo-source.c:1104: not expanding, nothing to expand
    (20:01:36) [0x55f4fb2236d0] [maybe_expand_container] rb-grilo-source.c:1104: not expanding, nothing to expand
    (20:01:36) [0x55f4fb2236d0] [maybe_expand_container] rb-grilo-source.c:1104: not expanding, nothing to expand
    (20:01:36) [0x55f4fb2236d0] [rhythmdb_process_one_event] rhythmdb.c:2672: processing RHYTHMDB_EVENT_QUERY_COMPLETE
    (20:01:36) [0x55f4fb2236d0] [rhythmdb_read_leave] rhythmdb.c:1263: counter: 0
    (20:01:36) [0x55f4fb2236d0] [rhythmdb_query_model_dispose] rhythmdb-query-model.c:730: disposing query model 0x55f4fdc9c240
    (20:01:36) [0x55f4fb2236d0] [rhythmdb_query_model_finalize] rhythmdb-query-model.c:778: finalizing query model 0x55f4fdc9c240
    (20:01:36) [0x55f4fb2236d0] [create_parent_dirs_cb] rb-track-transfer-batch.c:657: parent directories for mtp://%5Busb%3A003,006%5D/Internal%20shared%20storage/Music/Plastique%20Noir/24%20Hours%20Awake/04%20-%20Negatives.m4a created
    (20:01:36) [0x55f4fb2236d0] [bus_watch_cb] rb-encoder-gst.c:172: received error gstgiobasesink.c(112): gst_gio_base_sink_start (): /GstPipeline:pipeline/GstGioStreamSink:giostreamsink0:
    No output stream provided by subclass
    (20:01:36) [0x55f4fb2236d0] [encoder_completed_cb] rb-track-transfer-batch.c:564: encoder finished (error: Could not open resource for writing.)
    (20:01:36) [0x55f4fb2236d0] [track_done_cb] rb-transfer-target.c:359: fatal transfer error: Could not open resource for writing.
    (20:01:36) [0x55f4fb2236d0] [_rb_track_transfer_batch_cancel] rb-track-transfer-batch.c:448: batch being cancelled
    (20:01:36) [0x55f4fb2236d0] [transfer_batch_cancelled_cb] rb-media-player-source.c:750: sync file transfer to the device was cancelled
    Close to the end I can see:
    Code:
    rb-encoder-gst.c:172: received error gstgiobasesink.c(112):  gst_gio_base_sink_start ():  /GstPipeline:pipeline/GstGioStreamSink:giostreamsink0:
    No output stream provided by subclass
    but earlier on I can see:
    Code:
    (20:01:36) [0x55f4fb2236d0] [rb_track_transfer_batch_check_profiles]  rb-track-transfer-batch.c:308: have 0 profiles with missing plugins
    So Rhythmbox thinks that gstreamer has all of the right plugins, but then something breaks when it tries transferring the track (although I don't know why it appears to be encoding it via gstreamer when my phone supports m4a/aac).

    I'm running Tumbleweed (openSUSE-release-20180410) with Packman (although AAC is in "base", which isn't from Packman).

    GStreamer packages:
    • gstreamer-1.12.5-1.1.x86_64
    • gstreamer-devel-1.12.5-1.1.x86_64
    • gstreamer-lang-1.12.5-1.1.noarch
    • gstreamer-libnice-0.1.14-2.1.x86_64
    • gstreamer-plugin-cluttergst3-3.0.26-1.1.x86_64
    • gstreamer-plugins-bad-1.12.5-4.1.x86_64
    • gstreamer-plugins-bad-lang-1.12.5-4.1.noarch
    • gstreamer-plugins-bad-orig-addon-1.12.5-4.1.x86_64
    • gstreamer-plugins-base-1.12.5-1.1.x86_64
    • gstreamer-plugins-base-devel-1.12.5-1.1.x86_64
    • gstreamer-plugins-base-lang-1.12.5-1.1.noarch
    • gstreamer-plugins-farstream-0.2.8-2.1.x86_64
    • gstreamer-plugins-good-1.12.5-1.1.x86_64
    • gstreamer-plugins-good-extra-1.12.5-1.1.x86_64
    • gstreamer-plugins-good-lang-1.12.5-1.1.noarch
    • gstreamer-plugins-libav-1.12.5-24.1.x86_64
    • gstreamer-plugins-ugly-1.12.5-4.2.x86_64
    • gstreamer-plugins-ugly-lang-1.12.5-4.2.noarch
    • gstreamer-plugins-ugly-orig-addon-1.12.5-4.2.x86_64
    • gstreamer-plugins-vaapi-1.12.5-1.1.x86_64
    • gstreamer-utils-1.12.5-1.1.x86_64
    • gstreamer-validate-1.12.5-1.1.x86_64


    Anyone know how to fix it? Or how to debug it? At the moment then I don't even know what set of GStreamer components it is trying to use so that I can try them manually.

    Thanks.

  2. #2

    Default Re: Rhythmbox won't sync to phone - "Could not open resource for writing"

    Sorry, AAC isn't from base. I must have been thinking of the GIO stream.

    AAC (faad/faac) is in GStreamer Bad, which I've got from Packman All (along with libfaac0 and libfaad2). Both Base and Bad are v1.12.5, so it should be compatible.

    I've managed to find a command to convert AAC to MP3, which is pointless but should test the gstreamer pipeline:
    Code:
    gst-launch-1.0 filesrc location=src.aac ! qtdemux name=demux demux. ! queue ! faad ! lamemp3enc quality=2 bitrate=192 cbr=true demux. ! queue ! faad ! lamemp3enc quality=2 bitrate=192 cbr=true ! id3v2mux ! filesink location=out.mp3
    Currently that gives me:
    Code:
    Setting pipeline to PAUSED ...
    Pipeline is PREROLLING ...
    WARNING: from element /GstPipeline:pipeline0/GstQTDemux:demux: Delayed linking failed.
    Additional debug info:
    ./grammar.y(510): gst_parse_no_more_pads (): /GstPipeline:pipeline0/GstQTDemux:demux:
    failed delayed linking some pad of GstQTDemux named demux to some pad of GstQueue named queue1
    Redistribute latency...
    ERROR: from element /GstPipeline:pipeline0/GstQTDemux:demux: Internal data stream error.
    Additional debug info:
    qtdemux.c(6033): gst_qtdemux_loop (): /GstPipeline:pipeline0/GstQTDemux:demux:
    streaming stopped, reason not-linked (-1)
    ERROR: pipeline doesn't want to preroll.
    Setting pipeline to NULL ...
    Freeing pipeline ...
    It isn't quite the same as the error that Rhythmbox shows, but it does suggest that something is broken in my GStreamer setup (although "gst-play-1.0 src.aac" plays the file perfectly fine).

  3. #3
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,925
    Blog Entries
    14

    Default Re: Rhythmbox won't sync to phone - "Could not open resource for writing"

    This is probably related to a mix of packages from the distro and Packman's.
    Run
    Code:
     zypper dup --from YOUR_PACKMAN_REPO_NAME_HERE --allow-vendor-change
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  4. #4

    Default Re: Rhythmbox won't sync to phone - "Could not open resource for writing"

    I did wonder about that, but the "Switch Packages" option in Software Manager didn't change anything.

    If I check Zypper then it doesn't show gstreamer good from Packman, so I seem to *have* to mix them.
    Code:
    $ sudo zypper search -s gstreamer-plugins-good
    Loading repository data...
    Reading installed packages...
    
    S  | Name                               | Type    | Version    | Arch   | Repository             
    ---+------------------------------------+---------+------------+--------+------------------------
    i  | gstreamer-plugins-good             | package | 1.12.5-1.1 | x86_64 | openSUSE-Tumbleweed-Oss
    v  | gstreamer-plugins-good             | package | 1.12.5-1.1 | i586   | openSUSE-Tumbleweed-Oss
       | gstreamer-plugins-good-32bit       | package | 1.12.5-1.1 | x86_64 | openSUSE-Tumbleweed-Oss
       | gstreamer-plugins-good-doc         | package | 1.12.5-1.1 | x86_64 | openSUSE-Tumbleweed-Oss
       | gstreamer-plugins-good-doc         | package | 1.12.5-1.1 | i586   | openSUSE-Tumbleweed-Oss
    i+ | gstreamer-plugins-good-extra       | package | 1.12.5-1.1 | x86_64 | openSUSE-Tumbleweed-Oss
    v  | gstreamer-plugins-good-extra       | package | 1.12.5-1.1 | i586   | openSUSE-Tumbleweed-Oss
       | gstreamer-plugins-good-extra-32bit | package | 1.12.5-1.1 | x86_64 | openSUSE-Tumbleweed-Oss
       | gstreamer-plugins-good-jack        | package | 1.12.5-1.1 | x86_64 | openSUSE-Tumbleweed-Oss
       | gstreamer-plugins-good-jack        | package | 1.12.5-1.1 | i586   | openSUSE-Tumbleweed-Oss
       | gstreamer-plugins-good-jack-32bit  | package | 1.12.5-1.1 | x86_64 | openSUSE-Tumbleweed-Oss
    i  | gstreamer-plugins-good-lang        | package | 1.12.5-1.1 | noarch | openSUSE-Tumbleweed-Oss
    
    $ sudo zypper search -s gstreamer-plugins-bad
    Loading repository data...
    Reading installed packages...
    
    S  | Name                                              | Type       | Version    | Arch   | Repository             
    ---+---------------------------------------------------+------------+------------+--------+------------------------
    i+ | gstreamer-plugins-bad                             | package    | 1.12.5-4.1 | x86_64 | Packman Repository     
    v  | gstreamer-plugins-bad                             | package    | 1.12.5-1.1 | x86_64 | openSUSE-Tumbleweed-Oss
    v  | gstreamer-plugins-bad                             | package    | 1.12.5-4.1 | i586   | Packman Repository     
    v  | gstreamer-plugins-bad                             | package    | 1.12.5-1.1 | i586   | openSUSE-Tumbleweed-Oss
    …
    i+ | gstreamer-plugins-bad-lang                        | package    | 1.12.5-4.1 | noarch | Packman Repository     
    v  | gstreamer-plugins-bad-lang                        | package    | 1.12.5-1.1 | noarch | openSUSE-Tumbleweed-Oss
    i+ | gstreamer-plugins-bad-orig-addon                  | package    | 1.12.5-4.1 | x86_64 | Packman Repository     
    v  | gstreamer-plugins-bad-orig-addon                  | package    | 1.12.5-4.1 | i586   | Packman Repository
    I know that I've had problems with mixing Packman and core openSUSE GStreamer before, but it seems that Packman doesn't build Good for Tumbleweed (http://packman.links2linux.org/packa...r-plugins-good vs http://packman.links2linux.org/packa...er-plugins-bad)

    IIRC, I need Packman's "bad" plugins because the openSUSE ones don't support all of the (commonly used) proprietary formats.

  5. #5

    Default Re: Rhythmbox won't sync to phone - "Could not open resource for writing"

    Does anyone else have any suggestions? Or has anyone else got MTP syncing working on Tumbleweed so that I can compare configs?

    Thanks.

  6. #6

    Default Re: Rhythmbox won't sync to phone - "Could not open resource for writing"

    Anyone got any other suggestions? Am I the only one having MTP/GStreamer issues? None of the updates since my last post seem to have changed anything.

    I've tried removing Packman files and just using openSUSE Tumbleweed packages, but that seems to lose AAC (M4A) support and running the earlier "gst-launch" command results in "erroneous pipeline: no element "faad"".

  7. #7
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: Rhythmbox won't sync to phone - "Could not open resource for writing"

    Quote Originally Posted by IBBoard View Post
    Anyone got any other suggestions? Am I the only one having MTP/GStreamer issues? None of the updates since my last post seem to have changed anything.

    I've tried removing Packman files and just using openSUSE Tumbleweed packages, but that seems to lose AAC (M4A) support and running the earlier "gst-launch" command results in "erroneous pipeline: no element "faad"".
    support for apple devices is buggy I don't do music on my android but I have connected it via MTP and copied files with dolphin I don't think this is an mtp issue
    does rhythmbox even support syncing to iOS?
    can dolphin browse your iphones directory structure so you can copy/move files in it??

  8. #8

    Default Re: Rhythmbox won't sync to phone - "Could not open resource for writing"

    Thanks for the reply, but I think I covered all of that in the first post:

    I've previously used Rhythmbox to sync music to my Android phone using MTP, but now it refuses to work and gives the error "Could not open resource for writing". Syncing will delete tracks without a problem, and I can copy files to the phone using Nautilus, but from the logging then it seems that something broke in GStreamer.
    Unfortunately, I can't remember whether I last successfully synced my phone before or after I moved from Leap to Tumbleweed, so I don't know whether GStreamer broke or whether this has always been broken on Tumbleweed.

  9. #9

    Default Re: Rhythmbox won't sync to phone - "Could not open resource for writing"

    I think I've fixed it, and it appears to be nothing to do with GStreamer.

    While checking a few things about the file system and how it mounts (because I've been reading old posts that talk about how old/alternative MTP implementations worked) then I checked the phone through Nautilus.

    Previously, I've been adding and removing files elsewhere on the phone (because I needed to do it anyway, and because it's easier than getting the audio track on the phones so that the music app recognise tracks, albums, etc). This time I went in to the Music directory and saw that there were still some directories left. Which is odd, because syncing says that it's cleared the music and the music app doesn't see anything.

    Looking in those directories then I found some cover art. On a whim, I deleted the entire Music directory from the phone and tried syncing again. It's now at track 130 of 1540!

    So, while there was a GStreamer error just before the failure, it appears that they were a secondary effect of the underlying directory screw-up. And the separate GStreamer commands probably just failed because GStreamer is complex and I got them wrong.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •