Project doesnt run on device

My project doesn´t run on device only in the simulator.

Error message: Runtime error \car\CiderDebugger.lua:476: attempt to index local udpSocket(a nil value)

[lua]
local socket = require “socket”
local udpSocket = socket.udp()
udpSocket:setsockname( “localhost” ,CORONA_SOCKET_PORT) – LINE 476
udpSocket:setpeername(“localhost”,SOCKET_PORT)
[/lua]

this error appears after corona update. [import]uid: 154714 topic_id: 37489 reply_id: 67489[/import]

Hi there,

According to the Lua socket library documentation at (http://w3.impa.br/~diego/software/luasocket/udp.html), for [lua]socket.udp()[/lua], “in case of success, a new unconnected UDP object returned. In case of error, nil is returned, followed by an error message.”

The error you see in the terminal indicates that udpSocket is nil, which means that [lua]socket.udp()[/lua] is encountering an error when you run it on your device. To see the error message, try the following code:

[blockcode]
local socket = require “socket”
local udpSocket, errorMsg = socket.udp()

if udpSocket == nil then
print(errorMsg)
else
udpSocket:setsockname( “localhost” ,CORONA_SOCKET_PORT) – LINE 476
udpSocket:setpeername(“localhost”,SOCKET_PORT)
end
[/blockcode]

  • Andrew [import]uid: 109711 topic_id: 37489 reply_id: 145664[/import]

This error not appear in the terminal this error appears only in the physical device and the game not run after this message.
This error appears with any project created with glider after the new corona build.

[import]uid: 154714 topic_id: 37489 reply_id: 145671[/import]

@tunnelstudios:

When deploying to device from glider, use the hammer icon for build, rather than the ‘run’ or ‘debug’ buttons.

This will remove the require(“glider”) line from your main.cs, and allow the app to run on device.

-Ray [import]uid: 135765 topic_id: 37489 reply_id: 145675[/import]

Thanks r.delia now works perfectly. [import]uid: 154714 topic_id: 37489 reply_id: 145678[/import]

Hi there,

According to the Lua socket library documentation at (http://w3.impa.br/~diego/software/luasocket/udp.html), for [lua]socket.udp()[/lua], “in case of success, a new unconnected UDP object returned. In case of error, nil is returned, followed by an error message.”

The error you see in the terminal indicates that udpSocket is nil, which means that [lua]socket.udp()[/lua] is encountering an error when you run it on your device. To see the error message, try the following code:

[blockcode]
local socket = require “socket”
local udpSocket, errorMsg = socket.udp()

if udpSocket == nil then
print(errorMsg)
else
udpSocket:setsockname( “localhost” ,CORONA_SOCKET_PORT) – LINE 476
udpSocket:setpeername(“localhost”,SOCKET_PORT)
end
[/blockcode]

  • Andrew [import]uid: 109711 topic_id: 37489 reply_id: 145664[/import]

This error not appear in the terminal this error appears only in the physical device and the game not run after this message.
This error appears with any project created with glider after the new corona build.

[import]uid: 154714 topic_id: 37489 reply_id: 145671[/import]

@tunnelstudios:

When deploying to device from glider, use the hammer icon for build, rather than the ‘run’ or ‘debug’ buttons.

This will remove the require(“glider”) line from your main.cs, and allow the app to run on device.

-Ray [import]uid: 135765 topic_id: 37489 reply_id: 145675[/import]

Thanks r.delia now works perfectly. [import]uid: 154714 topic_id: 37489 reply_id: 145678[/import]