…will throw an error and then also corrupt whatever manages updates/installs.
To Reproduce
Steps to reproduce the behavior:
DO NOT TRY THIS ON THE COPY OF SHOSETSU YOU READ NOVELS WITH, YOU WILL LOSE YOUR DATA
you can install a second copy of shosetsu in
a. android studio
b. bluestacks
l. lucky patcher
it throws an error [string "ext(RoyalRoad)"]:7: '}' expected (to close '{' a..
========== (src/en/RoyalRoad.lua, LuaScript) ==========
org.luaj.vm2.LuaError: [string "ext(RoyalRoad.lua)"]:7: '}' expected (to close '{' at line 3)
at org.luaj.vm2.compiler.LexState.lexerror(Unknown Source)
at org.luaj.vm2.compiler.LexState.syntaxerror(Unknown Source)
at org.luaj.vm2.compiler.LexState.check_match(Unknown Source)
at org.luaj.vm2.compiler.LexState.constructor(Unknown Source)
at org.luaj.vm2.compiler.LexState.simpleexp(Unknown Source)
at org.luaj.vm2.compiler.LexState.subexpr(Unknown Source)
at org.luaj.vm2.compiler.LexState.expr(Unknown Source)
at org.luaj.vm2.compiler.LexState.explist(Unknown Source)
at org.luaj.vm2.compiler.LexState.localstat(Unknown Source)
at org.luaj.vm2.compiler.LexState.statement(Unknown Source)
at org.luaj.vm2.compiler.LexState.statlist(Unknown Source)
at org.luaj.vm2.compiler.LexState.mainfunc(Unknown Source)
at org.luaj.vm2.compiler.LuaC$CompileState.luaY_parser(Unknown Source)
at org.luaj.vm2.compiler.LuaC$CompileState.access$000(Unknown Source)
at org.luaj.vm2.compiler.LuaC.compile(Unknown Source)
at org.luaj.vm2.Globals.compilePrototype(Unknown Source)
at org.luaj.vm2.Globals.loadPrototype(Unknown Source)
at org.luaj.vm2.Globals.load(Unknown Source)
at org.luaj.vm2.Globals.load(Unknown Source)
at org.luaj.vm2.Globals.load(Unknown Source)
at app.shosetsu.lib.lua.LuaExtension.<init>(LuaExtension.kt:108)
at app.shosetsu.lib.lua.LuaExtension.<init>(LuaExtension.kt:93)
at TestKt.main(Test.kt:256)
' expected (to close '{' at line 3)
it also crashes
extensions can be uninstalled, cannot be updated, cannot be installed
a. Attempting to install an extension by clicking the download icon or clicking the extension then clicking install will have no visible effect at first (the download icon will still be there)
b. after going to another screen and back, the icon will change to a permanent spinning loading icon, with the version number gone
c. The version number can also be replaced with 'TODO', when ¿a previous version of the malformed extension was already installed? ¿after scrolling the Browse page?
d. disabling all repositories and refreshing shows the message "Obsolete extension! Please uninstall." under all installed extensions OR it could skip the malformed one based on [idk]
What doesn't work to fix it:
clearing cache
stopping/restarting cycle workers
restarting the app
restarting the phone
disabling all repositories
force stop
What does work to fix it:
clearing data WHICH DELETES ALL THE NOVELS IN THE LIBRARY
¿waiting like a day?
Expected behavior
If the extension is malformed, an error is thrown, with no permanent consequences
Screenshots
If applicable, add screenshots to help explain your problem.
Device information:
OS: Android 10, One UI 2.0
App Version: 2.0.0-1656
Phone: Samsung Galaxy A20 SM-A205U
Display: 2340×1080 virtual resolution downscaled onto a 1560×720 physical display (1.5² pixels in every 1² pixel)
Additional context
I accidentally did this to myself more than once because I was just using notepad++/git-bash/github/a phone/shosetsu without putting the extension through testing before installing it. If you program in the standard way where there are commas BETWEEN items {a,b,c} instead of AFTER items {a,b,c,} in a list, and you decide to reorder searchFilters or what's inside SOME_FILTER_INT by cut-pasting a line to a different place, this will happen {a,c b,}.
DANGEROUS TO TEST Describe the bug A malformed extension, for example one missing a comma… https://github.com/khonkhortisan/extensions/tree/stopupdates https://github.com/khonkhortisan/extensions/commit/ccb653bc7f6cb1254ac4802cdfd883a544655a3c
…will throw an error and then also corrupt whatever manages updates/installs.
To Reproduce Steps to reproduce the behavior:
[string "ext(RoyalRoad)"]:7: '}' expected (to close '{' a..
Expected behavior If the extension is malformed, an error is thrown, with no permanent consequences
Screenshots If applicable, add screenshots to help explain your problem.
Device information:
AND
Additional context I accidentally did this to myself more than once because I was just using notepad++/git-bash/github/a phone/shosetsu without putting the extension through testing before installing it. If you program in the standard way where there are commas BETWEEN items {a,b,c} instead of AFTER items {a,b,c,} in a list, and you decide to reorder searchFilters or what's inside SOME_FILTER_INT by cut-pasting a line to a different place, this will happen {a,c b,}.