Closed cacharrin closed 9 years ago
hey there,
there is another component necessary to make it work on Windows (i need to document it better)
""" since you’re on Windows, update the dmc_corona.cfg file to use Windows paths, eg LUA_PATH:JSON = [ “.\lib\dmc_corona" ] """
let me know if you have any other issues
Hi, thank you!
I changed it to: LUA_PATH:JSON = [ "dmc_corona" ](I have dmc_corona on my project root folder)
And now it works.
Than you!
2015-04-13 11:07 GMT-05:00 David McCuskey notifications@github.com:
hey there,
there is another component necessary to make it work on Windows (i need to document it better)
""" since you’re on Windows, update the dmc_corona.cfg file to use Windows paths, eg LUA_PATH:JSON = [ “.\lib\dmc_corona" ] """
let me know if you have any other issues
— Reply to this email directly or view it on GitHub https://github.com/dmccuskey/dmc-websockets/issues/4#issuecomment-92412415 .
Felipe Botero Londoño Ingeniero de Sistemas y Telecomunicaciones.
fantastic ! glad to hear it's working. have fun !
Hi david...
I moved dmc_corona to "lib" folder..
So i have /main.lua /dmc_corona.cfg /dmc_corona_boot.lua /lib /dmc_corona /all_dmc_corona_files_here /other_file.lua
I have modified dmc_corona_cfg as: LUA_PATH:JSON = [ "lib\dmc_corona"]
inside /lib/other_file.lua i have: dmc_websockets = require("lib.dmc_corona.dmc_websockets") //Require needs the full path
It works properly on windows... but if i compile it for android and run it, it shows error: init.lua : 820 module 'lib.dmc_lua.lua_bytearray' not found
I tried many configurations of LUA_PATH:JSON but none of them works... the same message is always displayed :(
I tried: LUA_PATH:JSON = [ "lib\dmc_corona"] //A single path LUA_PATH:JSON = [ "lib\dmc_corona", "lib\dmc_corona\lib"] //multiple paths LUA_PATH:JSON = [ "lib/dmc_corona", "lib/dmc_corona\lib"] //using slash LUA_PATH:JSON = [ "./lib/dmc_corona", "./lib/dmc_corona\lib"] //using initial dots
I tried everything... I can get it to work on android... it always shows the same error message
Can you help me? What i'm doing wrong?
Thank you :)
2015-04-13 12:53 GMT-05:00 David McCuskey notifications@github.com:
fantastic ! glad to hear it's working. have fun !
— Reply to this email directly or view it on GitHub https://github.com/dmccuskey/dmc-websockets/issues/4#issuecomment-92444840 .
Felipe Botero Londoño Ingeniero de Sistemas y Telecomunicaciones.
I'm considering it a bug, so I write here again...
I tried using forward slashes, but it didn't help either... :(
I tried to compile the example dmc-websockets-echo example... with many different config... some of them throw exceptions if i try to run them on windows simulator... but all of them can be compiled for android and run on the device.
I tried the example as is, with:
LUA_PATH:JSON = [ ".dmc_corona"]
Logcat in device shows:
I/Corona (31188): ##############################################
I/Corona (31188):
V/Corona (31188): > Class.forName: dmc_websockets.bytearray.LuaLoader
V/Corona (31188): WARNING: Could not load 'LuaLoader'
V/Corona (31188): > Class.forName: .dmc_corona.dmc_websockets.bytearray.LuaLoad
er
V/Corona (31188): WARNING: Could not load 'LuaLoader'
I/Corona (31188): Runtime error
I/Corona (31188): module 'dmc_websockets.bytearray' not found in archive:
I/Corona (31188): /
I/Corona (31188): /Users/jenkins/slaveroot/workspace/Templates/label/android/pl
atform/resources/init.lua:820: module 'dmc_websockets.bytearray' not found:resou
rce (dmc_websockets.bytearray.lu) does not exist in archive
....
I tried too:
LUA_PATH:JSON = [ "/dmc_corona"] or
LUA_PATH:JSON = [ "./dmc_corona"] or
LUA_PATH:JSON = [ "./dmc_corona/"]
I/Corona ( 456): ##############################################
I/Corona ( 456):
V/Corona ( 456): > Class.forName: dmc_websockets.bytearray.LuaLoader
V/Corona ( 456): WARNING: Could not load 'LuaLoader'
V/Corona ( 456): > Class.forName: lua_objects.LuaLoader
V/Corona ( 456): WARNING: Could not load 'LuaLoader'
V/Corona ( 456): > Class.forName: lua_utils.LuaLoader
V/Corona ( 456): WARNING: Could not load 'LuaLoader'
V/Corona ( 456): > Class.forName: lua_bytearray.exceptions.LuaLoader
V/Corona ( 456): WARNING: Could not load 'LuaLoader'
V/Corona ( 456): > Class.forName: lua_objects.LuaLoader
V/Corona ( 456): WARNING: Could not load 'LuaLoader'
V/Corona ( 456): > Class.forName: lua_error.LuaLoader
V/Corona ( 456): WARNING: Could not load 'LuaLoader'
V/Corona ( 456): > Class.forName: lua_objects.LuaLoader
V/Corona ( 456): WARNING: Could not load 'LuaLoader'
V/Corona ( 456): > Class.forName: lua_bytearray.exceptions.LuaLoader
V/Corona ( 456): WARNING: Could not load 'LuaLoader'
V/Corona ( 456): > Class.forName: lua_objects.LuaLoader
V/Corona ( 456): WARNING: Could not load 'LuaLoader'
V/Corona ( 456): > Class.forName: lua_patch.LuaLoader
V/Corona ( 456): WARNING: Could not load 'LuaLoader'
V/Corona ( 456): > Class.forName: lua_utils.LuaLoader
V/Corona ( 456): WARNING: Could not load 'LuaLoader'
I/Corona ( 456): Lua Patch::activating patch 'table-pop'
I/Corona ( 456): Lua Patch::activating patch 'string-format'
V/Corona ( 456): > Class.forName: dmc_sockets.LuaLoader
V/Corona ( 456): WARNING: Could not load 'LuaLoader'
V/Corona ( 456): > Class.forName: lua_objects.LuaLoader
V/Corona ( 456): WARNING: Could not load 'LuaLoader'
V/Corona ( 456): > Class.forName: lua_utils.LuaLoader
V/Corona ( 456): WARNING: Could not load 'LuaLoader'
V/Corona ( 456): > Class.forName: dmc_sockets.tcp.LuaLoader
V/Corona ( 456): WARNING: Could not load 'LuaLoader'
V/Corona ( 456): > Class.forName: lua_objects.LuaLoader
V/Corona ( 456): WARNING: Could not load 'LuaLoader'
V/Corona ( 456): > Class.forName: lua_utils.LuaLoader
V/Corona ( 456): WARNING: Could not load 'LuaLoader'
V/Corona ( 456): > Class.forName: dmc_sockets.async_tcp.LuaLoader
V/Corona ( 456): WARNING: Could not load 'LuaLoader'
V/Corona ( 456): > Class.forName: lua_objects.LuaLoader
V/Corona ( 456): WARNING: Could not load 'LuaLoader'
V/Corona ( 456): > Class.forName: dmc_sockets.tcp.LuaLoader
V/Corona ( 456): WARNING: Could not load 'LuaLoader'
V/Corona ( 456): > Class.forName: plugin.openssl.LuaLoader
V/Corona ( 456): WARNING: Could not load 'LuaLoader'
V/Corona ( 456): > Class.forName: dmc_corona.plugin.openssl.LuaLoader
V/Corona ( 456): WARNING: Could not load 'LuaLoader'
I/Corona ( 456): Runtime error
I/Corona ( 456): module 'dmc_sockets' not found in archive:
I/Corona ( 456): /
I/Corona ( 456): /Users/jenkins/slaveroot/workspace/Templates/label/android/pl
atform/resources/init.lua:820: module 'dmc_sockets' not found:resource (dmc_sock
ets.lu) does not exist in archive
....
I tried too:
LUA_PATH:JSON = [ ".\\dmc_corona"] (Windows style)
LUA_PATH:JSON = [ "\\dmc_corona"]
I/Corona ( 5639): ##############################################
I/Corona ( 5639):
V/Corona ( 5639): > Class.forName: dmc_websockets.bytearray.LuaLoader
V/Corona ( 5639): WARNING: Could not load 'LuaLoader'
V/Corona ( 5639): > Class.forName: .\dmc_corona.dmc_websockets.bytearray.LuaLoa
der
V/Corona ( 5639): WARNING: Could not load 'LuaLoader'
I/Corona ( 5639): Runtime error
I/Corona ( 5639): module 'dmc_websockets.bytearray' not found in archive:
I/Corona ( 5639): /
I/Corona ( 5639): /Users/jenkins/slaveroot/workspace/Templates/label/android/pl
atform/resources/init.lua:820: module 'dmc_websockets.bytearray' not found:resou
rce (dmc_websockets.bytearray.lu) does not exist in archive
I/Corona ( 5639): no field package.preload['dmc_websockets.bytearray']
I/Corona ( 5639): no file '(null)/dmc_websockets.bytearray.lua'
I/Corona ( 5639): no file '(null)/dmc_websockets.bytearray.lua'
...
Thank you for your support... :)
i pushed a fix for this issue – making some updates to dmc_corona_boot.lua.
some of the changes made it so that what is put in LUA_PATH doesn't have to match the platform it's on, so in the end the following are the same:
LUA_PATH:JSON = [ ".\\dmc_corona"]
LUA_PATH:JSON = [ "./dmc_corona"]
LUA_PATH:JSON = [ "lib/dmc_corona"]
LUA_PATH:JSON = [ "lib\\dmc_corona"]
I david... I just tested it... Now issue is not a critical issue... but... I found weird things on Device Log...
It says "Cannot load LuaLoader" many times... but at the end, dmc-websockets-echo runs, and it send and receive 5 messages, and finish correctly... It is OK? Can I ignore this initial WARNINGS?
I/Corona ( 3496): ##############################################
I/Corona ( 3496):
V/Corona ( 3496): > Class.forName: lib.dmc_lua.lua_bytearray.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: lua_bytearray.exceptions.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_corona.lua_bytearray.exceptions.LuaLoade
r
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: lua_objects.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_corona.lua_objects.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: lua_error.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_corona.lua_error.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: lua_objects.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_corona.lua_objects.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: lua_objects.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_corona.lua_objects.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: lua_bytearray.pack_bytearray.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_corona.lua_bytearray.pack_bytearray.LuaL
oader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: pack.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_corona.pack.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_corona.lib.dmc_lua.pack.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: lib.dmc_lua.lua_bytearray.exceptions.LuaLoad
er
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_objects.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: lib.dmc_lua.lua_objects.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: lib.dmc_lua.lua_events_mix.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: lib.dmc_lua.lua_patch.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_sockets.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_objects.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_utils.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: lib.dmc_lua.lua_utils.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_sockets.tcp.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_objects.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_utils.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_sockets.async_tcp.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_objects.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_sockets.tcp.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_sockets.ssl_params.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: lib.dmc_lua.lua_objects.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: lib.dmc_lua.lua_utils.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: lib.dmc_lua.lua_states_mix.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_utils.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_websockets.exception.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: lib.dmc_lua.lua_error.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: lib.dmc_lua.lua_objects.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_websockets.frame.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: lib.dmc_lua.bit.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: plugin.bit.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_corona.plugin.bit.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_corona.lib.dmc_lua.plugin.bit.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: lib.bit.numberlua.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_corona.lib.bit.numberlua.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: lib.dmc_lua.lua_bytearray.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_websockets.exception.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_utils.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_websockets.handshake.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: lib.dmc_lua.lua_patch.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: lib.sha1.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
I/Corona ( 3496): Lua Patch::activating patch 'string-format'
V/Corona ( 3496): > Class.forName: dmc_websockets.message.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: lib.dmc_lua.lua_bytearray.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: dmc_objects.LuaLoader
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
I/Corona ( 3496): Lua Patch::activating patch 'table-pop'
I/Corona ( 3496): Received event: ONOPEN
I/Corona ( 3496): === Sending 5 messages ===
I/Corona ( 3496): Sending message (1): 'Current app time: 3381.521'
I/Corona ( 3496): Received event: ONMESSAGE
I/Corona ( 3496): echoed message: 'Current app time: 3381.521'
I/Corona ( 3496):
I/Corona ( 3496): Sending message (2): 'Current app time: 3989.702'
I/Corona ( 3496): Received event: ONMESSAGE
I/Corona ( 3496): echoed message: 'Current app time: 3989.702'
I/Corona ( 3496):
I/Corona ( 3496): Sending message (3): 'Current app time: 4623.23'
I/Corona ( 3496): Received event: ONMESSAGE
I/Corona ( 3496): echoed message: 'Current app time: 4623.23'
I/Corona ( 3496):
I/Corona ( 3496): Sending message (4): 'Current app time: 5277.749'
I/Corona ( 3496): Received event: ONMESSAGE
I/Corona ( 3496): echoed message: 'Current app time: 5277.749'
I/Corona ( 3496):
I/Corona ( 3496): Sending message (5): 'Current app time: 5948.854'
I/Corona ( 3496): Received event: ONMESSAGE
I/Corona ( 3496): echoed message: 'Current app time: 5948.854'
I/Corona ( 3496):
I/Corona ( 3496): Received event: ONCLOSE
I/Corona ( 3496): code:reason 1000 Purpose for connection has been fulfille
d
I noticed a weird thing on Simulator too... "print" statements are no longer complete... I mean... In the previos version was:
I/Corona ( 3496): Sending message (1): 'Current app time: 3381.521'
I/Corona ( 3496): Received event: ONMESSAGE
I/Corona ( 3496): echoed message: 'Current app time: 3381.521'
and 500 miliseconds later
I/Corona ( 3496): Sending message (2): 'Current app time: 3989.702'
I/Corona ( 3496): Received event: ONMESSAGE
I/Corona ( 3496): echoed message: 'Current app time: 3989.702'
And so on...
at the end:
code:reason 1000 Purpose for connection has been fulfille
But in this version I see:
I/Corona ( 3496): Received event: ONOPEN
I/Corona ( 3496): === Sending 5 messages ===
Sending mess
(See that the previous message is incomplete) Then, 2 o 3 seconds later... shows:
age (1): 'Current app time: 580'
Received event: ONMESSAGE
echoed message: 'Current app time: 580'
Sending message (2): 'Current app time: 1210'
Received event: ONMESSAGE
echoed message: 'Current app time: 1210'
Sending message (3): 'Current app time: 1863'
Received event: ONMESSAGE
echoed message: 'Current app time: 1863'
Sending message (4): 'Current app time: 2525'
Received event: ONMESSAGE
echoed message: 'Current app time: 2525'
Sending message (5): 'Current app time: 3145'
Received event: ONMES
The last message is incomplete too.. I never shows:
code:reason 1000 Purpose for connection has been fulfille
Maybe this is a "simulator" problem... I just wanna you to know... maybe is related with your change...
Thank you.
these errors are "normal" on Android:
V/Corona ( 3496): WARNING: Could not load 'LuaLoader'
V/Corona ( 3496): > Class.forName: lib.dmc_lua.lua_error.LuaLoader
this happens because java/android seems to throw it's own errors (even though i'm catching the ones from Lua).
as far as last issue, i'm getting the proper strings on Windows 7, latest Android (?) on my Nexus 7. I see that output at the end (code 1000) in my terminal, but the last character 'd' in mine has simply just wrapped to the next line. the behavior looks like it has more to do with the Terminal app i'm using (built in version) than anything else. i also see that the other message, though split, is still complete (text is on following line). i don't know adb/logcat enough to know its quirks, but i don't think it's anything to worry about. i will keep it in mind though.
thanks, dmc
ps, i'm viewing the log using:
adb logcat -s Corona
Dang, grabbed the latest push, installed on Nexus 7 and Kindle Fire.
To start, the text of the table cells shows up, not the flags. Then, when I start scrolling around on the table view, even the text just disappears and everything goes white in the table.
thanks for pointing that out. i pushed a fix in the UI repo: https://github.com/dmccuskey/DMC-Corona-UI/issues/2
cheers !
Thank you david... is working now on Android :) Have a nice day :+1:
Hi, i'm trying to include the library in CoronaSKD (Using windows 7)
I'm just opening the dmc-websockets-echo on CoronaSDK Simulator and it throws an error:
Corona Runtime Error
Error calling 'require("./dmc_corona.lib.dmc_lua.lua_bytearray")'. Lua requires package names to use '.' as path separators, not '/'. Replace the '/' characters with '.' and try again. stack traceback: [C]: in function 'error' dmc_corona_boot.lua:538: in function 'require' dmc_corona\dmc_websockets.lua:141: in main chunk [C]: in function 'require' ?: in function 'require' main.lua:19: in main chunk
Do you want to relaunch the project?
Sí No
It is a bug? What i'm doing wrong?
Thank you