RocketChat / Rocket.Chat.Cordova

Rocket.Chat Cross-Platform Mobile Application via Cordova (DEPRECATED)
MIT License
104 stars 109 forks source link

sandstorm-credentials issue in Custom Mobile app connection #80

Closed testuser2015 closed 8 years ago

testuser2015 commented 8 years ago

I am connecting with my custom mobile app, demo server connection ok, but when i am trying with custom rocket chat server.All files are downloaded correctly .But during the connection , The application fails to downoad sandstorm-credentials. As the file is not found, the xhr response body is null and the callback throws: "/.sandstorm-credentials is not JSON?" and breaks here. I have edited host in the coffescript and make the url to correct. Hwo to solve this error Android mobile app has this problem, and it is build from rocket chat cordova buils my rocketchat details

version: "0.19.0", build: { date: "2016-03-03T11:19:59.790Z", nodeVersion: "v0.10.40", arch: "x64", platform: "linux", osRelease: "3.19.0-25-generic", totalMemmory: 4144271360, freeMemmory: 639389696, cpus: 4 }, commit: { hash: "b7c0ea08b8b0d339c5a76bad1526a697d2bd0420", date: "Tue Feb 23 17:24:11 2016 -0300", author: "Rodrigo Nascimento", subject: "Merge pull request #2310 from RocketChat/improvements/upload-preview", tag: "0.19.0", branch: "develop" }, Version is latest one What is the problem. Why it is going to download /.sandstorm-credentials .Is it possible to disable it in server and run mobile app.

rodrigok commented 8 years ago

We do not support sandstorm in our mobile and desktop apps.

testuser2015 commented 8 years ago

I only need to run this custom mobile application build from Rocketchat cordova app in android Mobile, when i am running i am getting this /.sandstorm-credentials is not JSON?" in console and application trying to reconnect. How can i solve this issue ?
screenshot_2016-03-07-12-51-41

rodrigok commented 8 years ago

Are you using sandstorm to host your server?

testuser2015 commented 8 years ago

No I have not used anything, I have used cordova git hub code from git and build and run in android device. Demo server working fine, but our custom server download files are ok, but stuck on this error, on chrome://inspect i have seen the above error "/.sandstorm-credentials is not JSON?"

rodrigok commented 8 years ago

How are you running your server?

testuser2015 commented 8 years ago

Following the steps .https://github.com/RocketChat/Rocket.Chat.Cordova

rodrigok commented 8 years ago

Your server, not your app.

testuser2015 commented 8 years ago

My server is linux debian one. It is linux debian one. domain name is subdomain and it is private one and it is only available in here only like test.mydomain.com

rodrigok commented 8 years ago

What command are you using to start the process?

testuser2015 commented 8 years ago

cordova run android

testuser2015 commented 8 years ago

how to solve this issue, is any chat available to chat with Rocketchat member to solve this issue.

rodrigok commented 8 years ago

Can you tell us how command are you using to run your Rocket.Chat server?

testuser2015 commented 8 years ago

git clone https://github.com/RocketChat/Rocket.Chat.git cd Rocket.Chat meteor

we have used sudo meteor and it is working fine and can see through web/mobile.

Problem with mobile app only .

rodrigok commented 8 years ago

Great, thank you @testuser2015

So, as you are using the development mode, you should define the url where your server is running so the mobile apps can connect to that url.

use meteor --mobile-server http://192.168.0.10:3000 replace the http://192.168.0.10:3000 by your host or ip address.

After that you should remove the server from your app or delete and reinstall the app to download the server files again containing the correct url to connect.

Please, reopen this issue if you need.

barteljan commented 8 years ago

Hey,

we have exactly the same problem when deploying the server by docker and connecting to it by the Rocket.Chat.Cordova App with an iOS device.

Did we miss some environment configurations to get it running ?

We are using the following docker compose yml to create and start the server:

mongo: image: mongo command: mongod --smallfiles --oplogSize 128

rocketchat: image: rocketchat/rocket.chat:latest environment: