dbankier / TiShadow

Quick Titanium previews across devices
http://tishadow.yydigital.com
Other
385 stars 122 forks source link

After update socket.io, app can't connect to TiShadow server. #532

Closed yomybaby closed 7 years ago

yomybaby commented 7 years ago

After 5164e9433387ccded47beae98e5da372b47b2518 commit, app can't connect to TiShadow server. Before 5164e9433387ccded47beae98e5da372b47b2518 commit, it work properly.

5164e9433387ccded47beae98e5da372b47b2518 needs more test? or is there something that I miss?

dbankier commented 7 years ago

Did you update the app as well?

On Sun, 23 Apr. 2017, 11:36 pm Jong Eun Lee, notifications@github.com wrote:

After 5164e94 https://github.com/dbankier/TiShadow/commit/5164e9433387ccded47beae98e5da372b47b2518 commit, app can't connect to TiShadow server. Before 5164e94 https://github.com/dbankier/TiShadow/commit/5164e9433387ccded47beae98e5da372b47b2518 commit, it work properly.

5164e94 https://github.com/dbankier/TiShadow/commit/5164e9433387ccded47beae98e5da372b47b2518 needs more test? or is there something that I miss?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dbankier/TiShadow/issues/532, or mute the thread https://github.com/notifications/unsubscribe-auth/AAxN3f4_O4JMeHtgD0ADy22oS--byqmrks5ry1PDgaJpZM4NFaOs .

yomybaby commented 7 years ago

What I did

Yes. Rerun appify and restart server. I tested on iOS simulator below:

Env

Xcode 8.3.1, macOS 10.12.3, Node 6.9.4, Ti 6.0.3.GA, also add below code to tiapp.xml

 <dict>
  <key>NSAllowsArbitraryLoads</key><true/>
</dict>
dbankier commented 7 years ago

hmmm... I'm testing on iOS sim too. It wasn't working initially until I updated all the client side socket.io. Was the appify a clean build?

yomybaby commented 7 years ago

Yes!

dbankier commented 7 years ago

hmm... reinstalled the node_modules on the server side?

yomybaby commented 7 years ago

Oops. I forgot to nom install because I use Tishadow with npm link. I'll try again now and let you know.

yomybaby commented 7 years ago

Sorry for my mistake. Now it connected, but ts @ run have an below error. (ts run is okey)

/Users/yomybaby/Documents/TiWorkspace/_tools/TiShadow/cli/support/api.js:20
    connected_socket.socket.reconnect();
                           ^

TypeError: Cannot read property 'reconnect' of undefined
    at postToServer (/Users/yomybaby/Documents/TiWorkspace/_tools/TiShadow/cli/support/api.js:20:28)
    at Object.exports.newBundle (/Users/yomybaby/Documents/TiWorkspace/_tools/TiShadow/cli/support/api.js:80:3)
    at WriteStream.<anonymous> (/Users/yomybaby/Documents/TiWorkspace/_tools/TiShadow/cli/support/compiler.js:86:11)
    at emitNone (events.js:91:20)
    at WriteStream.emit (events.js:185:7)
    at fs.js:2037:14
    at /Users/yomybaby/Documents/TiWorkspace/_tools/TiShadow/node_modules/readdirp/node_modules/graceful-fs/graceful-fs.js:43:10
    at /Users/yomybaby/Documents/TiWorkspace/_tools/TiShadow/node_modules/archiver-utils/node_modules/graceful-fs/graceful-fs.js:43:10
    at FSReqWrap.oncomplete (fs.js:123:15)
dbankier commented 7 years ago

did you update all the node modules? the socket.io-client is also updated.

dbankier commented 7 years ago

Just saw your new error when running it with JAST, but not using ts @ run -u. Looking at it now.

dbankier commented 7 years ago

Just removing that line fixes it.

yomybaby commented 7 years ago

Thanks!