GithubHelp home page GithubHelp logo

Comments (41)

hannemann avatar hannemann commented on May 25, 2024 2

#22 I had success when i tried to switch to another lib than request (https://github.com/sindresorhus/got)

The got lib works quite similar to request hence i recommend to use it in hassioApiTools aswell

from hassio-nextcloud-backup.

Sebclem avatar Sebclem commented on May 25, 2024

I have seen this on my today backup, I already find the problems, I will make the fix realise tonight, thank for the issue !

from hassio-nextcloud-backup.

Raoulex avatar Raoulex commented on May 25, 2024

Thank you also for this awesome add-on, great work

from hassio-nextcloud-backup.

Sebclem avatar Sebclem commented on May 25, 2024

I fix it with the 0.7.3 release, i close the issue but if you still have the bug, fell free to open a new one.

from hassio-nextcloud-backup.

Raoulex avatar Raoulex commented on May 25, 2024

Unfortunately, issue remains, just no error in the log, but the file size is still 0

from hassio-nextcloud-backup.

Sebclem avatar Sebclem commented on May 25, 2024

Hum, ok interesting, i can't reproduce this issue, is this with manual backup or auto ?

from hassio-nextcloud-backup.

Raoulex avatar Raoulex commented on May 25, 2024

Hum, ok interesting, i can't reproduce this issue, is this with manual backup or auto ?

Manual,
the log looks clean
Debugger listening on ws://0.0.0.0:9226/641e5d69-2235-42df-869e-744ab3a73b77
For help, see: https://nodejs.org/en/docs/inspector
[2020-02-16 20:51:50] [info]: Satus : Go !
[2020-02-16 20:51:50] [info]: Initilizing and checking webdav client...
[2020-02-16 20:51:50] [info]: Starting auto clean cron...
[2020-02-16 20:51:50] [info]: Starting Cron...
[2020-02-16 20:51:50] [info]: Hassio API : Go !
[2020-02-16 20:51:51] [info]: Nextcloud connection : Go !
[2020-02-16 20:52:34] [info]: Initilizing and checking webdav client...
[2020-02-16 20:52:39] [info]: Creating new snapshot...
[2020-02-16 20:54:04] [info]: Snapshot created with id 34ba947a
[2020-02-16 20:54:04] [info]: Downloading snapshot 34ba947a...
[2020-02-16 20:54:05] [info]: Download success !
[2020-02-16 20:54:05] [info]: Uploading snap...
[2020-02-16 20:54:08] [info]: ...Upload finish !
[2020-02-16 20:54:08] [info]: Local clean done.
[2020-02-16 20:57:56] [info]: Downloading snapshot 2d8a515a...
[2020-02-16 20:57:58] [info]: Download success !
[2020-02-16 20:57:58] [info]: Uploading snap...
[2020-02-16 20:58:02] [info]: ...Upload finish !
[2020-02-16 20:58:02] [info]: Local clean done.

but in nextcloud is 0 size
image

from hassio-nextcloud-backup.

Sebclem avatar Sebclem commented on May 25, 2024

Ok, i will add more verbose logs to find where is the issue...
Can i have some informations about your setup:

  • Home assistant version
  • HassIo version
  • System arch
  • Nextcloud version

from hassio-nextcloud-backup.

Raoulex avatar Raoulex commented on May 25, 2024

Ok, i will add more verbose logs to find where is the issue...
Can i have some informations about your setup:

  • Home assistant version : 0.105.4
  • HassIo version : 3.10 supervisor version 200
  • System arch : Debian GNU/Linux 10 (buster
  • Nextcloud version : 17.0.2

Auto backup has the same issue

when i start the addon i get the following, maybe this helps:
Add-on version: 0.7.3
You are running the latest version of this add-on.
parse error: Expected string key before ':' at line 1, column 4
[20:51:49] ERROR: Unknown HTTP error occured
System: (amd64 / intel-nuc)
Home Assistant version: 0.105.4
Supervisor version: 200

but after, everything looks ok
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[20:51:49] INFO: Starting Node...

[email protected] start /opt/nextcloud_backup
node --inspect=0.0.0.0:9226 ./bin/www

Debugger listening on ws://0.0.0.0:9226/641e5d69-2235-42df-869e-744ab3a73b77
For help, see: https://nodejs.org/en/docs/inspector
[2020-02-16 20:51:50] [info]: Satus : Go !
[2020-02-16 20:51:50] [info]: Initilizing and checking webdav client...
[2020-02-16 20:51:50] [info]: Starting auto clean cron...
[2020-02-16 20:51:50] [info]: Starting Cron...
[2020-02-16 20:51:50] [info]: Hassio API : Go !
[2020-02-16 20:51:51] [info]: Nextcloud connection : Go !
[2020-02-16 20:52:34] [info]: Initilizing and checking webdav client...
[2020-02-16 20:52:39] [info]: Creating new snapshot...
[2020-02-16 20:54:04] [info]: Snapshot created with id 34ba947a
[2020-02-16 20:54:04] [info]: Downloading snapshot 34ba947a...
[2020-02-16 20:54:05] [info]: Download success !
[2020-02-16 20:54:05] [info]: Uploading snap...
[2020-02-16 20:54:08] [info]: ...Upload finish !
[2020-02-16 20:54:08] [info]: Local clean done.

from hassio-nextcloud-backup.

Raoulex avatar Raoulex commented on May 25, 2024

setup update accordingly to latest releases:

System: (amd64 / intel-nuc)
Home Assistant version: 0.106.4
Supervisor version: 206
Nextcloud version : 18.0.1

it still updates with size 0

from hassio-nextcloud-backup.

sam-harry avatar sam-harry commented on May 25, 2024

Thank you for your hard work on this add-on!

I'm experiencing the same issue (manual backup uploads a size 0 file). My system setup is:

System: Raspberry Pi 3B+
Home Assistant version: 0.106.5
Supervisor version: 209
Nextcloud Version: 18.0.1
Nextcloud Backup Version: 0.7.4

from hassio-nextcloud-backup.

Baptno avatar Baptno commented on May 25, 2024

Thanks for your tool.
Same issue here :

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 10-run: applying...
[fix-attrs.d] 10-run: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing...


Hass.io Add-on: Nextcloud Backup
Hass.io snapshot backup to Nextcloud

Add-on version: 0.7.4
There is an update available for this add-on!
Latest add-on version: null
Please consider upgrading as soon as possible.
parse error: Expected string key before ':' at line 1, column 4
[22:26:20] ERROR: Unknown HTTP error occured
System: (armv7 / raspberrypi3)
Home Assistant version: 0.108.5
Supervisor version: 217

Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.

[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[22:26:22] INFO: Starting Node...

[email protected] start /opt/nextcloud_backup
node --inspect=0.0.0.0:9226 ./bin/www
Debugger listening on ws://0.0.0.0:9226/b871deff-6972-4a94-ac8d-003e128c9c70
For help, see: https://nodejs.org/en/docs/inspector
[2020-04-16 22:26:27] [info]: Satus : Go !
[2020-04-16 22:26:27] [info]: Initilizing and checking webdav client...
[2020-04-16 22:26:27] [info]: Starting auto clean cron...
[2020-04-16 22:26:27] [info]: Starting Cron...
[2020-04-16 22:26:28] [info]: Hassio API : Go !
[2020-04-16 22:26:29] [info]: Nextcloud connection : Go !
[2020-04-16 22:27:03] [info]: Creating new snapshot...
[2020-04-16 22:27:03] [info]: Snapshot created with id 34215064
[2020-04-16 22:27:03] [info]: Downloading snapshot 34215064...
[2020-04-16 22:27:03] [info]: Download success !
[2020-04-16 22:27:03] [info]: Uploading snap...
[2020-04-16 22:27:04] [info]: ...Upload finish !
[2020-04-16 22:29:08] [info]: Creating new snapshot...
[2020-04-16 22:29:08] [info]: Snapshot created with id 0c364d39
[2020-04-16 22:29:08] [info]: Downloading snapshot 0c364d39...
[2020-04-16 22:29:08] [info]: Download success !
[2020-04-16 22:29:08] [info]: Uploading snap...
[2020-04-16 22:29:09] [info]: ...Upload finish !

from hassio-nextcloud-backup.

Jib-san avatar Jib-san commented on May 25, 2024

Hi,

Same issue for me, apart from the error that an update is available, everything looks perfect, but snaps uploaded to nextcloud are 0 bytes files.

  • System: Raspberry Pi 3B+
  • Home Assistant version: 0.108.5
  • Supervisor version: 217
  • Nextcloud Version: 17.05
  • Nextcloud Backup Version: 0.7.4

All logs since app starting to backup ending:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 10-run: applying...
[fix-attrs.d] 10-run: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing...
Hass.io Add-on: Nextcloud Backup
Hass.io snapshot backup to Nextcloud
Add-on version: 0.7.4
There is an update available for this add-on!
Latest add-on version: null
Please consider upgrading as soon as possible.
parse error: Expected string key before ':' at line 1, column 4
[16:02:14] ERROR: Unknown HTTP error occured
System: (armv7 / raspberrypi3)
Home Assistant version: 0.108.5
Supervisor version: 217
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
Log level is set to TRACE
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[16:02:16] INFO: Starting Node...
[email protected] start /opt/nextcloud_backup
node --inspect=0.0.0.0:9226 ./bin/www
Debugger listening on ws://0.0.0.0:9226/b36b62a5-872f-431f-bb4a-87a1cdd17dc1
For help, see: https://nodejs.org/en/docs/inspector
[2020-04-21 16:02:25] [info]: Satus : Go !
[2020-04-21 16:02:25] [info]: Initilizing and checking webdav client...
[2020-04-21 16:02:25] [info]: Starting auto clean cron...
[2020-04-21 16:02:26] [info]: Starting Cron...
[2020-04-21 16:02:26] [info]: Hassio API : Go !
[2020-04-21 16:02:27] [info]: Nextcloud connection : Go !
[2020-04-21 16:02:52] [info]: Creating new snapshot...
[2020-04-21 16:05:39] [info]: Snapshot created with id c998d3ca
[2020-04-21 16:05:39] [info]: Downloading snapshot c998d3ca...
[2020-04-21 16:05:53] [info]: Download success !
[2020-04-21 16:05:54] [info]: Uploading snap...
[2020-04-21 16:06:22] [info]: ...Upload finish !
[2020-04-21 16:06:22] [info]: Local clean done.
[2020-04-21 16:06:22] [info]: Cloud clean done.

from hassio-nextcloud-backup.

Sebclem avatar Sebclem commented on May 25, 2024

OK, i have made an update with more logs to try to understand this bug, can you provide me the new logs ?

from hassio-nextcloud-backup.

Raoulex avatar Raoulex commented on May 25, 2024

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 10-run: applying...
[fix-attrs.d] 10-run: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing...


Hass.io Add-on: Nextcloud Backup
Hass.io snapshot backup to Nextcloud

Add-on version: 0.7.5
There is an update available for this add-on!
Latest add-on version: null
Please consider upgrading as soon as possible.
parse error: Expected string key before ':' at line 1, column 4
[16:53:47] ERROR: Unknown HTTP error occured
System: (amd64 / intel-nuc)
Home Assistant version: 0.108.9
Supervisor version: 219

Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.

[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
Log level is set to DEBUG
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[16:53:47] INFO: Starting Node...

[email protected] start /opt/nextcloud_backup
node --inspect=0.0.0.0:9226 ./bin/www

Debugger listening on ws://0.0.0.0:9226/577ea9d3-0c39-48ef-ae45-cdcf1c5724c0
For help, see: https://nodejs.org/en/docs/inspector
[2020-04-29 16:53:49] [info]: Satus : Go !
[2020-04-29 16:53:49] [info]: Initilizing and checking webdav client...
[2020-04-29 16:53:49] [info]: Starting auto clean cron...
[2020-04-29 16:53:49] [info]: Starting Cron...
[2020-04-29 16:53:49] [info]: Hassio API : Go !
[2020-04-29 16:53:50] [debug]: Nextcloud connection: Success !
[2020-04-29 16:53:51] [info]: Nextcloud connection : Go !
[2020-04-29 16:55:53] [info]: Creating new snapshot...
[2020-04-29 16:57:14] [info]: Snapshot created with id 95ad2696
[2020-04-29 16:57:14] [info]: Downloading snapshot 95ad2696...
[2020-04-29 16:57:14] [debug]: Snapshot size: 383.12
[2020-04-29 16:57:15] [info]: Download success !
[2020-04-29 16:57:15] [debug]: Snapshot dl size : 383.115234375
[2020-04-29 16:57:15] [info]: Uploading snap...
[2020-04-29 16:57:21] [info]: ...Upload finish ! (status: 201)

from hassio-nextcloud-backup.

Sebclem avatar Sebclem commented on May 25, 2024

Any error in Nextcloud logs ?

from hassio-nextcloud-backup.

Raoulex avatar Raoulex commented on May 25, 2024

{"reqId":"Xqp7Ipjbfyg0ieZjSYXcLAAAABY","level":0,"time":"2020-04-30T07:15:46+00:00","remoteAddr":"xxx.xxx.xxx.241","user":"Raoul","app":"no app in context","method":"PUT","url":"/remote.php/webdav/Hassio%20Backup/Manual/Manual-2020-04-29_16:55.tar","message":"Deprecated event type for {"[object] (OCP\SabrePluginEvent)":{"*statusCode":200,"*message":"","*server":{"[object] (OCA\DAV\Connector\Sabre\Server)":{"tree":"[object] (OCA\DAV\Connector\Sabre\ObjectTree)","*baseUri":"/remote.php/webdav/","httpResponse":"[object] (Sabre\HTTP\Response)","httpRequest":"[object] (Sabre\HTTP\Request)","sapi":"[object] (Sabre\HTTP\Sapi)","*plugins":[],"transactionType":null,"protectedProperties":{"...":"Over 20 items, aborting normalization"},"debugExceptions":false,"resourceTypeMapping":[],"enablePropfindDepthInfinity":true,"xml":"[object] (Sabre\DAV\Xml\Service)","*listeners":{"...":"Over 20 items, aborting normalization"},"*logger":null}},"Symfony\Contracts\EventDispatcher\EventpropagationStopped":false}}: null","userAgent":"--","version":"18.0.4.2"}
{"reqId":"Xqp7Ipjbfyg0ieZjSYXcLAAAABY","level":0,"time":"2020-04-30T07:15:47+00:00","remoteAddr":"xxx.xxx.xxx.241","user":"Raoul","app":"music","method":"PUT","url":"/remote.php/webdav/Hassio%20Backup/Manual/Manual-2020-04-29_16:55.tar","message":"update - /Raoul/files/Hassio Backup/Manual/Manual-2020-04-29_16:55.tar","userAgent":"--","version":"18.0.4.2"}
{"reqId":"Xqp7Ipjbfyg0ieZjSYXcLAAAABY","level":0,"time":"2020-04-30T07:15:47+00:00","remoteAddr":"xxx.xxx.xxx.241","user":"Raoul","app":"music","method":"PUT","url":"/remote.php/webdav/Hassio%20Backup/Manual/Manual-2020-04-29_16:55.tar","message":"skipped - file is outside of specified music folder","userAgent":"--","version":"18.0.4.2"}

from hassio-nextcloud-backup.

Raoulex avatar Raoulex commented on May 25, 2024

And these errors come all the time in debug:

{"reqId":"Xqp-YDlNCtDQdbn1Pz@jpgAAAEI","level":0,"time":"2020-04-30T07:33:52+00:00","remoteAddr":"xxx.xxx.xxx.241","user":"Raoul","app":"no app in context","method":"PROPFIND","url":"/remote.php/webdav/Hassio%20Backup/Manual/","message":"Deprecated event type for {"[object] (OCP\SabrePluginEvent)":{"*statusCode":200,"*message":"","*server":{"[object] (OCA\DAV\Connector\Sabre\Server)":{"tree":"[object] (OCA\DAV\Connector\Sabre\ObjectTree)","*baseUri":"/remote.php/webdav/","httpResponse":"[object] (Sabre\HTTP\Response)","httpRequest":"[object] (Sabre\HTTP\Request)","sapi":"[object] (Sabre\HTTP\Sapi)","*plugins":[],"transactionType":null,"protectedProperties":{"...":"Over 20 items, aborting normalization"},"debugExceptions":false,"resourceTypeMapping":[],"enablePropfindDepthInfinity":true,"xml":"[object] (Sabre\DAV\Xml\Service)","*listeners":{"...":"Over 20 items, aborting normalization"},"*logger":null}},"Symfony\Contracts\EventDispatcher\EventpropagationStopped":false}}: null","userAgent":"axios/0.19.0","version":"18.0.4.2"}
{"reqId":"Xqp-YDlNCtDQdbn1Pz@jpwAAAEY","level":0,"time":"2020-04-30T07:33:53+00:00","remoteAddr":"xxx.xxx.xxx.241","user":"Raoul","app":"no app in context","method":"PROPFIND","url":"/remote.php/webdav/Hassio%20Backup/Auto/","message":"Deprecated event type for {"[object] (OCP\SabrePluginEvent)":{"*statusCode":200,"*message":"","*server":{"[object] (OCA\DAV\Connector\Sabre\Server)":{"tree":"[object] (OCA\DAV\Connector\Sabre\ObjectTree)","*baseUri":"/remote.php/webdav/","httpResponse":"[object] (Sabre\HTTP\Response)","httpRequest":"[object] (Sabre\HTTP\Request)","sapi":"[object] (Sabre\HTTP\Sapi)","*plugins":[],"transactionType":null,"protectedProperties":{"...":"Over 20 items, aborting normalization"},"debugExceptions":false,"resourceTypeMapping":[],"enablePropfindDepthInfinity":true,"xml":"[object] (Sabre\DAV\Xml\Service)","*listeners":{"...":"Over 20 items, aborting normalization"},"*logger":null}},"Symfony\Contracts\EventDispatcher\EventpropagationStopped":false}}: null","userAgent":"axios/0.19.0","version":"18.0.4.2"}

from hassio-nextcloud-backup.

Raoulex avatar Raoulex commented on May 25, 2024

Adding 'overwriteprotocol' => 'https' in config didn't solved the issue, in my opinion is something from the ssl

from hassio-nextcloud-backup.

Sebclem avatar Sebclem commented on May 25, 2024

I'm more interesting by this =>skipped - file is outside of specified music folder
I think it's more an issue with the destination folder.
This afternoon i will add the option to change le upload location.

I found this thread on google but i think it's no very useful here.

And just to be sure, did you use app password ? If yes, can you try with your usual password ?

from hassio-nextcloud-backup.

Raoulex avatar Raoulex commented on May 25, 2024

I usually use app password, but today i changed to usual password and still the same.

I don't really think is from the music error, it does not come all the time,
*listeners":{"...":"Over 20 items, aborting normalization"}
this is more likely the problem, i see that there where problems from v 17 of nextcloud, but who knows

from hassio-nextcloud-backup.

sebortner avatar sebortner commented on May 25, 2024

Just to bump this thread. I'm experiencing similar issues. Neither manual, nor automatic backups have proper sizes.

Raspberry 3B+
Home Assistant 0.111.1
Supervisor 227
NC Addon 0.7.5
Nextcloud 18.0.4

Thanks for your work Sebclem!

from hassio-nextcloud-backup.

kicker334 avatar kicker334 commented on May 25, 2024

Just another bump on this thread as well. I have similar issue with both manual and automatic backups. I use app password and it worked when I first installed the add-on... It doesn't seem to be working anymore.

Raspberry Pi
Home Assistant 0.112.1
Supervisor 228
NC Addon 0.7.8
Nextcloud 19.0.0

from hassio-nextcloud-backup.

Sebclem avatar Sebclem commented on May 25, 2024

@sebortner @kicker334
Can i have the addon and nextcloud logs ? (In pastbin or other)

I'm a bit stuck with this issue because i can't reproduce it...

I will try to install another nextcloud in a VM.

from hassio-nextcloud-backup.

kicker334 avatar kicker334 commented on May 25, 2024

Sorry this took a bit. Been a busy day. Thank you for trying to help us out. :) This is a great Add-on to have!

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 10-run: applying... 
[fix-attrs.d] 10-run: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Hass.io Add-on: Nextcloud Backup
 Hass.io snapshot backup to Nextcloud
-----------------------------------------------------------
 Add-on version: 0.7.8
 There is an update available for this add-on!
 Latest add-on version: null
 Please consider upgrading as soon as possible.
parse error: Expected string key before ':' at line 1, column 4
[03:00:30] ERROR: Unknown HTTP error occured
 System:   (armv7 / raspberrypi3)
 Home Assistant version: 0.112.1
 Supervisor version: 228
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[03:00:41] INFO: Starting Node...
> [email protected] start /opt/nextcloud_backup
> node --inspect=0.0.0.0:9226 ./bin/www 
Debugger listening on ws://0.0.0.0:9226/048e6d3a-e960-44be-9d83-638f228fd3b6
For help, see: https://nodejs.org/en/docs/inspector
[2020-07-04 03:06:37] [info]: Satus : Go !
[2020-07-04 03:06:37] [info]: Initilizing and checking webdav client...
[2020-07-04 03:06:37] [info]: Starting auto clean cron...
[2020-07-04 03:06:37] [info]: Starting Cron...
[2020-07-04 03:06:38] [info]: Hassio API : Go !
[2020-07-04 03:06:38] [debug]: Nextcloud connection:  Success !
[2020-07-04 03:06:38] [info]: Nextcloud connection : Go !
[2020-07-04 03:08:21] [info]: Creating new snapshot...
[2020-07-04 03:09:19] [info]: Snapshot created with id 3d10c30c
[2020-07-04 03:09:19] [info]: Downloading snapshot 3d10c30c...
[2020-07-04 03:09:19] [debug]: Snapshot size: 25.02
[2020-07-04 03:09:22] [info]: Download success !
[2020-07-04 03:09:22] [debug]: Snapshot dl size : 25.01953125
[2020-07-04 03:09:22] [info]: Uploading snap...
[2020-07-04 03:09:24] [info]: ...Upload finish ! (status: 201)

from hassio-nextcloud-backup.

mojo17 avatar mojo17 commented on May 25, 2024

I'm seeing 0 byte uploads for both manual and automatic backups as well. I am using Amazon S3 as my Nextcloud storage back-end in case it makes any difference. Nextcloud version is 19.0.0, but I was experiencing this issue with Nextcloud 18 as well.

Please let me know how I can further help debug this issue.

Here's the add-on log:

-----------------------------------------------------------
 Hass.io Add-on: Nextcloud Backup
 Hass.io snapshot backup to Nextcloud
-----------------------------------------------------------
 Add-on version: 0.7.8
 There is an update available for this add-on!
 Latest add-on version: null
 Please consider upgrading as soon as possible.
parse error: Expected string key before ':' at line 1, column 4
[18:09:42] ERROR: Unknown HTTP error occured
 System:   (armv7 / raspberrypi4)
 Home Assistant version: 0.112.2
 Supervisor version: 228
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[18:09:43] INFO: Starting Node...
> [email protected] start /opt/nextcloud_backup
> node --inspect=0.0.0.0:9226 ./bin/www 
Debugger listening on ws://0.0.0.0:9226/d97ed47b-825a-476b-8b20-c6d064bab188
For help, see: https://nodejs.org/en/docs/inspector
[2020-07-05 18:09:46] [info]: Satus : Go !
[2020-07-05 18:09:46] [info]: Initilizing and checking webdav client...
[2020-07-05 18:09:46] [info]: Starting auto clean cron...
[2020-07-05 18:09:46] [info]: Starting Cron...
[2020-07-05 18:09:46] [info]: Hassio API : Go !
[2020-07-05 18:09:46] [debug]: Nextcloud connection:  Success !
[2020-07-05 18:09:47] [info]: Nextcloud connection : Go !
[2020-07-05 18:15:38] [info]: Creating new snapshot...
[2020-07-05 18:16:55] [info]: Snapshot created with id 592b9a6c
[2020-07-05 18:16:55] [info]: Downloading snapshot 592b9a6c...
[2020-07-05 18:16:55] [debug]: Snapshot size: 65.91
[2020-07-05 18:17:00] [info]: Download success !
[2020-07-05 18:17:00] [debug]: Snapshot dl size : 65.908203125
[2020-07-05 18:17:01] [info]: Uploading snap...
[2020-07-05 18:17:02] [info]: ...Upload finish ! (status: 201)
[2020-07-05 18:17:02] [debug]: Snapshot size: 67.72
[2020-07-05 18:17:02] [info]: Local clean done.
[2020-07-05 18:17:02] [info]: Cloud clean done.

Here's Nextcloud's log. There are no errors when the backup job finishes. I see the following errors when I navigate to the backup directory via the web interface. I suspect that they are triggered because the files are 0 bytes long.

[PHP] Error: fopen(https://s3.us-east-1.amazonaws.com/com.xxxxxxxxxx.nextcloud/urn%3Aoid%3A96496): failed to open stream: HTTP request failed! HTTP/1.1 416 Requested Range Not Satisfiable
 at /var/www/html/lib/private/Files/ObjectStore/S3ObjectTrait.php#75

GET /remote.php/webdav/Hassio%20Backup/Manual/Manual-2020-07-05_18%3A15.tar
from xxx.xxx.xxx.xxx by user17 at 2020-07-05T22:19:34+00:00

[PHP] Error: fopen(httpseek://): failed to open stream: "OC\Files\Stream\SeekableHttpStream::stream_open" call failed at /var/www/html/lib/private/Files/Stream/SeekableHttpStream.php#67

GET /remote.php/webdav/Hassio%20Backup/Manual/Manual-2020-07-05_18%3A15.tar
from xxx.xxx.xxx.xxx by user17 at 2020-07-05T22:19:34+00:00

[webdav] Fatal: Sabre\DAV\Exception\ServiceUnavailable: Could not open file at <<closure>>

0. /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 90
   OCA\DAV\Connector\Sabre\File->get()
1. /var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
   Sabre\DAV\CorePlugin->httpGet(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
2. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 474
   Sabre\DAV\Server->emit("method:GET", [Sabre\HTTP\Requ ... }])
3. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 251
   Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
4. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 319
   Sabre\DAV\Server->start()
5. /var/www/html/apps/dav/appinfo/v1/webdav.php line 82
   Sabre\DAV\Server->exec()
6. /var/www/html/remote.php line 167
   require_once("/var/www/html/a ... p")

GET /remote.php/webdav/Hassio%20Backup/Manual/Manual-2020-07-05_18%3A15.tar
from xxx.xxx.xxx.xxx by user17 at 2020-07-05T22:19:34+00:00

from hassio-nextcloud-backup.

Sebclem avatar Sebclem commented on May 25, 2024

Hello everyone,

Can i have your installation method for your Nextcloud instance ? (Apache, Lighthttpd, Snap package, docker etc...)
I still trying to reproduce this issue.

from hassio-nextcloud-backup.

sebortner avatar sebortner commented on May 25, 2024

from hassio-nextcloud-backup.

mojo17 avatar mojo17 commented on May 25, 2024

I use a docker setup from the examples suggested by the Nextcloud team. Here's the specific docker config I use. It features an nginx proxy with letsencrypt-companion to handle certs, behind which Nextcloud runs on another nginx instance, and postgresql as the database back-end.

from hassio-nextcloud-backup.

kicker334 avatar kicker334 commented on May 25, 2024

I use the snap install on a ubuntu server OS.

from hassio-nextcloud-backup.

kicker334 avatar kicker334 commented on May 25, 2024

I recently got this error:

[2020-07-07 01:00:00] [error]: uncaughtException: this.clean is not a function
TypeError: this.clean is not a function
    at CronJob._clean (/opt/nextcloud_backup/tools/cronTools.js:147:18)
    at CronJob.fireOnTick (/opt/nextcloud_backup/node_modules/cron/lib/cron.js:562:23)
    at Timeout.callbackWrapper [as _onTimeout] (/opt/nextcloud_backup/node_modules/cron/lib/cron.js:629:10)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node --inspect=0.0.0.0:9226 ./bin/www `
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-07-07T05_00_03_728Z-debug.log

And also I saw this in the logs at the beginning. Not sure if it is important or not.

parse error: Expected string key before ':' at line 1, column 4
[22:37:33] ERROR: Unknown HTTP error occured

from hassio-nextcloud-backup.

kicker334 avatar kicker334 commented on May 25, 2024

@Sebclem is there anything else we can do to help with this issue?

from hassio-nextcloud-backup.

Sebclem avatar Sebclem commented on May 25, 2024

At this point, I just need time to install a new nextcloud instance. With a bit of luck, I will be able to reproduce this issue.

I'm also considering splitting the backups file to prevent errors related to max body size and this can maybe also fix this issue.

from hassio-nextcloud-backup.

kicker334 avatar kicker334 commented on May 25, 2024

I attempted to send a pull request. sometimes :'s are a problem with filenames. I figured it was worth a shot. I'm not a github expert, so I probably did it wrong, but you should see the pull requests and make the change in a few minutes.

from hassio-nextcloud-backup.

mojo17 avatar mojo17 commented on May 25, 2024

Unfortunately, this patch did not resolve the issue for me. I'm still getting 0 byte files in Nextcloud. Log files do not show any errors.

from hassio-nextcloud-backup.

kicker334 avatar kicker334 commented on May 25, 2024

It was worth a shot. I'm not a javascript person... I'll keep digging a little later

from hassio-nextcloud-backup.

kicker334 avatar kicker334 commented on May 25, 2024

Here's what I got... As I said, I'm not a JS person. My guess is that it has something to do with line 169 let req = request.put(option)
I'm having difficulty finding the implementation method elsewhere on the internet for how this was done. That doesn't mean it is incorrect, I just can't find it. There's a webdav client in nodeJS that could be used that has putfilecontents. Perhaps that can be used instead of the .put? https://github.com/perry-mitchell/webdav-client#putfilecontents and NextCloud seems to think it is a good package (as of 2017)? https://nextcloud.com/blog/using-webdav-fs-to-access-files-in-nextcloud/.
I see some reference to having method: 'PUT', in the options tag as well. Maybe that is required?
I'm not sure how to include the latest version of webdav in this project to possibly use putfilecontents.

from hassio-nextcloud-backup.

Sebclem avatar Sebclem commented on May 25, 2024

I have made a new release, let me know is this fix your issue. If yes, i will move all my request to Got.

from hassio-nextcloud-backup.

hannemann avatar hannemann commented on May 25, 2024

After refreshing the addon store the update became available and a manual backup succeeded.

from hassio-nextcloud-backup.

Raoulex avatar Raoulex commented on May 25, 2024

Problem solved, i can confirm, tried manual and auto backup, everything works.
PS: need to use app password, it didn't work with user password
Can be closed

from hassio-nextcloud-backup.

kicker334 avatar kicker334 commented on May 25, 2024

I can confirm as well. Thank you @hannemann!

from hassio-nextcloud-backup.

Related Issues (20)

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.