Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloud Storage bug on Kindle 4NT #9027

Closed
clrizzi opened this issue Apr 21, 2022 · 14 comments · Fixed by #9041
Closed

Cloud Storage bug on Kindle 4NT #9027

clrizzi opened this issue Apr 21, 2022 · 14 comments · Fixed by #9041
Labels
NT Non Touch devices

Comments

@clrizzi
Copy link

clrizzi commented Apr 21, 2022

  • KOReader version: 2022.03.1
  • Device: Kindle 4NT

Issue

The Cloud Storage option is empty when I access this menu on my Kindle 4NT.

I should see the "Add new Cloud Storage" button (for use with Dropbox or FTP) but it doesn't. I checked inside the folder "\Koreader\frontend\apps\cloustorage" and all the ".lua" files are there (dropbox.lua; ftpapi.lua; dropboxapi.lua; ftp.lua; webdav.lua; cloudstorage.lua).

I compared these files with those on a newer device and they appear to be the same

Did I miss some configuration?

crash.log
[crash.log](https://github.com/koreader/koreader/files/8535212/crash.log)

@NiLuJe
Copy link
Member

NiLuJe commented Apr 21, 2022

In case that might be the issue: it's only available in the file manager, not the reader.

@clrizzi
Copy link
Author

clrizzi commented Apr 21, 2022

Even in the file manager I don't see any buttons. The page is completely empy...

@hius07
Copy link
Member

hius07 commented Apr 22, 2022

Adding a storage is done via title left button but it is available for touch devices only.
Needs fixing.
As a temporary workaround: add a storage manually in koreader/settings/cloudstorage.lua.

@hius07 hius07 added the NT Non Touch devices label Apr 22, 2022
@hius07
Copy link
Member

hius07 commented Apr 22, 2022

-- No button on non-touch device
local left_icon_reserved_width = 0
local right_icon_reserved_width = 0
if Device:isTouchDevice() then
if self.left_icon then
self.has_left_icon = true
left_icon_reserved_width = left_icon_size + self.button_padding
end
if self.right_icon then
self.has_right_icon = true
right_icon_reserved_width = right_icon_size + self.button_padding
end
end

Maybe @comphilip can help.

@hius07
Copy link
Member

hius07 commented Apr 22, 2022

Format of koreader/settings/cloudstorage.lua:

-- we can read Lua syntax here!
return {
    ["cs_servers"] = {
        [1] = {
            ["name"] = "hius07@",
            ["password"] = "xxx",
            ["type"] = "dropbox",
            ["url"] = "/",
        },
        [2] = {
            ["address"] = "ftp://192.168.0.104",
            ["name"] = "ASUS media player hdd",
            ["password"] = "",
            ["type"] = "ftp",
            ["url"] = "/",
            ["username"] = "",
        },
        [3] = {
            ["address"] = "a",
            ["name"] = "Good library with free classic books",
            ["password"] = "",
            ["type"] = "webdav",
            ["url"] = "",
            ["username"] = "",
        },
    },
    ["download_dir"] = "/mnt/us/books/TestFolder",
}

For Dropbox token is a password.

@comphilip
Copy link
Contributor

After quick search, there are 22 TitleBar:new calls. Need times to check everyone and regression test.

@clrizzi
Copy link
Author

clrizzi commented Apr 23, 2022

Format of koreader/settings/cloudstorage.lua:

-- we can read Lua syntax here!
return {
    ["cs_servers"] = {
        [1] = {
            ["name"] = "hius07@",
            ["password"] = "xxx",
            ["type"] = "dropbox",
            ["url"] = "/",
        },
        [2] = {
            ["address"] = "ftp://192.168.0.104",
            ["name"] = "ASUS media player hdd",
            ["password"] = "",
            ["type"] = "ftp",
            ["url"] = "/",
            ["username"] = "",
        },
        [3] = {
            ["address"] = "a",
            ["name"] = "Good library with free classic books",
            ["password"] = "",
            ["type"] = "webdav",
            ["url"] = "",
            ["username"] = "",
        },
    },
    ["download_dir"] = "/mnt/us/books/TestFolder",
}

For Dropbox token is a password.

Thanks, @hius07 this Works for me.

@clrizzi
Copy link
Author

clrizzi commented Apr 23, 2022

After quick search, there are 22 TitleBar:new calls. Need times to check everyone and regression test.

Thanks, @comphilip ! I appreciate your help!

@clrizzi
Copy link
Author

clrizzi commented Apr 23, 2022

I found some other bugs for this device. Do I keep reporting?

@comphilip
Copy link
Contributor

@clrizzi You are welcomed.

@clrizzi
Copy link
Author

clrizzi commented Apr 26, 2022

It's just weird.

As I had said earlier, the procedure that the @hius07 indicated of manually creating the "cloudstorage.lua" file was working correctly. However, over time I'm often losing my connection to Dropbox.

When I try to access, I have the following error message: "Cannot fetch list of folder contents. Please check your configuration or Network Connection." My network is enabled and functioning normally and the "Network Info" option gives me the IP information, the network SSID, and the "Gateway Ping Successful" message.

Every time this happens, I need to access my Dropbox account, generate a new access token, and change it in the "cloudstorage.lua" file.

This works for some time though, then I have the same error. So I decided to run some tests. I installed KOReader on my android phone and correctly set up the Dropbox account. Soon after some time, I had the same error.

The log file does not tell me what is the error.

Would Dropbox be blocking access? I check all settings, including file permissions on my cloud and everything seems to be correct.

crash.log
.

@clrizzi
Copy link
Author

clrizzi commented Apr 26, 2022

Oh... After my previosly post, I found something that might be related: Issue #8571

@clrizzi
Copy link
Author

clrizzi commented May 3, 2022

Thanks, @comphilip ! So should i close this topic now?

@comphilip
Copy link
Contributor

Keep it open. Once the PR is reviewed and merged, then you can download the nighty version, close it after your testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NT Non Touch devices
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants