Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Latest cli snapshots build gets error when list local plugins on windows #639

Open
atYuguo opened this issue Mar 7, 2021 · 0 comments
Open

Comments

@atYuguo
Copy link

atYuguo commented Mar 7, 2021

Version: https://get.syncany.org/dist/snapshots/syncany-cli-latest-snapshot.exe, 5a90af9

With: jre-8u281-windows-x64

Problem:

C:\Users\xxxx>sy plugin list -L --debug
debug
Application version: 0.4.9-alpha+SNAPSHOT.2101201305.git5a90af9
7-3-21 17:39:50.154 | CommandLineClie | main           | INFO : Application version: 0.4.9-alpha+SNAPSHOT.2101201305.git5a90af9
7-3-21 17:39:50.219 | CommandLineClie | main           | SEVE : Command org.syncany.cli.PluginCommand@735b478 FAILED.
java.lang.RuntimeException: Unable to load plugins.
        at org.syncany.plugins.Plugins.loadPlugins(Plugins.java:176)
        at org.syncany.plugins.Plugins.list(Plugins.java:59)
        at org.syncany.operations.plugin.PluginOperation.getLocalList(PluginOperation.java:582)
        at org.syncany.operations.plugin.PluginOperation.executeList(PluginOperation.java:515)
        at org.syncany.operations.plugin.PluginOperation.execute(PluginOperation.java:120)
        at org.syncany.cli.PluginCommand.execute(PluginCommand.java:62)
        at org.syncany.cli.CommandLineClient.runLocally(CommandLineClient.java:392)
        at org.syncany.cli.CommandLineClient.runCommand(CommandLineClient.java:382)
        at org.syncany.cli.CommandLineClient.start(CommandLineClient.java:198)
        at org.syncany.Syncany.main(Syncany.java:52)
Caused by: java.io.IOException: Invalid argument
        at java.io.WinNTFileSystem.canonicalize0(Native Method)
        at java.io.WinNTFileSystem.canonicalize(Unknown Source)
        at java.io.File.getCanonicalPath(Unknown Source)
        at java.io.File.getCanonicalFile(Unknown Source)
        at com.google.common.reflect.ClassPath$Scanner.scan(ClassPath.java:360)
        at com.google.common.reflect.ClassPath$Scanner.scan(ClassPath.java:354)
        at com.google.common.reflect.ClassPath.from(ClassPath.java:119)
        at org.syncany.plugins.Plugins.loadPlugins(Plugins.java:145)
        ... 9 more
Error: Unable to load plugins.
       Refer to help page using '--help'.

This doesn't happen to the release version back to 2017. And it seems to be caused by the second empty -classpath given to java, for example:

$ java.exe -cp "c:\Program Files (x86)\Syncany\lib\*" org.syncany.Syncany plugin list -L
Id    | Name  | Local Version                              | Type   | Remote Version | Updatable | Provided By
------+-------+--------------------------------------------+--------+----------------+-----------+-------------
local | Local | 0.4.9-alpha+SNAPSHOT.2101201305.git5a90af9 | Global |                |           | Syncany Team

, everything is good when only one -classpath is given. Also when there're plugins in the second folder

C:\Users\xxx>dir d:\abc
 驱动器 D 中的卷没有标签。
 卷的序列号是 0AD4-3381

 d:\abc 的目录

07.03.2021  18:11    <DIR>          .
07.03.2021  18:11    <DIR>          ..
07.03.2021  18:10           412.436 syncany-plugin-dropbox-0.4.5-alpha.jar
07.03.2021  18:09         4.036.880 syncany-plugin-gui-0.4.9-alpha.jar

nothing happens

$ java.exe -cp "c:\Program Files (x86)\Syncany\lib\*;d:\abc\*" org.syncany.Syncany plugin list -L
Id      | Name    | Local Version                              | Type   | Remote Version | Updatable | Provided By
--------+---------+--------------------------------------------+--------+----------------+-----------+-------------
dropbox | Dropbox | 0.4.5-alpha                                | Global |                |           | Syncany Team
gui     | GUI     | 0.4.9-alpha                                | Global |                |           | Syncany Team
local   | Local   | 0.4.9-alpha+SNAPSHOT.2101201305.git5a90af9 | Global |                |           | Syncany Team

. However when the second folder is empty

$ java.exe -cp "c:\Program Files (x86)\Syncany\lib\*;d:\abc\*" org.syncany.Syncany plugin list -L
Error: Unable to load plugins.
       Refer to help page using '--help'.

.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant