Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React native different behaviour between debug mode and normal mode #19716

Closed
guitar9 opened this issue Jun 14, 2018 · 2 comments
Closed

React native different behaviour between debug mode and normal mode #19716

guitar9 opened this issue Jun 14, 2018 · 2 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@guitar9
Copy link

guitar9 commented Jun 14, 2018

hi I have a really complicated problem. So I created a new repo for this problem at github. So you can clone it and see what the problem is.

https://github.com/guitar9/hafas-client-example

I am using https://github.com/public-transport/hafas-client in this project to get train and railway station informations.

client.journeys(münchenHbf, münchenPassing)
.then((response)=>{
  console.log('===============response=====================');
  console.log(response);
  console.log('====================================');
})
.catch(console.error)

the request is in

node_modules/hafas-client/lib/request
Problem is in debug mode everything works fine (shake phone and start remote JS Debugging), but when i stop JS Debugging i get Error 'PARSE'.

So i looked up in request.js and logged out request and response in debug mode and not in debug mode.

Request Debug Mode

{
    "method": "post",
    "body": "{\"lang\":\"en\",\"svcReqL\":[{\"cfg\":{\"polyEnc\":\"GPA\"},\"meth\":\"TripSearch\",\"req\":{\"outDate\":\"20180614\",\"outTime\":\"174837\",\"ctxScr\":null,\"getPasslist\":false,\"maxChg\":5,\"minChgTime\":0,\"depLocL\":[{\"lid\":\"A=1@L=008000261@\"}],\"viaLocL\":null,\"arrLocL\":[{\"lid\":\"A=1@L=008004158@\"}],\"jnyFltrL\":[{\"type\":\"PROD\",\"mode\":\"INC\",\"value\":\"1023\"},{\"type\":\"META\",\"mode\":\"INC\",\"meta\":\"notBarrierfree\"}],\"getTariff\":false,\"outFrwd\":true,\"getPT\":true,\"getIV\":false,\"getPolyline\":false,\"numF\":5,\"trfReq\":{\"jnyCl\":2,\"tvlrProf\":[{\"type\":\"E\",\"redtnCard\":null}],\"cType\":\"PK\"}}}],\"client\":{\"id\":\"DB\",\"v\":\"16040000\",\"type\":\"IPH\",\"name\":\"DB Navigator\"},\"ext\":\"DB.R15.12.a\",\"ver\":\"1.16\",\"auth\":{\"type\":\"AID\",\"aid\":\"n91dB8Z77MLdoR0K\"}}",
    "headers": {
        "Content-Type": "application/json",
        "Accept": "application/json",
        "user-agent": "https://github.com/public-transport/hafas-client"
    },
    "query": {
        "checksum": "6af3b74db20e14c7f94012e3de55dce6"
    }
}

Response Debug Mode

all informations. everything okay.

Request not in debug mode

{
    "method": "post",
    "body": "{\"lang\":\"en\",\"svcReqL\":[{\"cfg\":{\"polyEnc\":\"GPA\"},\"meth\":\"TripSearch\",\"req\":{\"outDate\":\"Invalid DateTime\",\"outTime\":\"Invalid DateTime\",\"ctxScr\":null,\"getPasslist\":false,\"maxChg\":5,\"minChgTime\":0,\"depLocL\":[{\"lid\":\"A=1@L=008000261@\"}],\"viaLocL\":null,\"arrLocL\":[{\"lid\":\"A=1@L=008004158@\"}],\"jnyFltrL\":[{\"type\":\"PROD\",\"mode\":\"INC\",\"value\":\"1023\"},{\"type\":\"META\",\"mode\":\"INC\",\"meta\":\"notBarrierfree\"}],\"getTariff\":false,\"outFrwd\":true,\"getPT\":true,\"getIV\":false,\"getPolyline\":false,\"numF\":5,\"trfReq\":{\"jnyCl\":2,\"tvlrProf\":[{\"type\":\"E\",\"redtnCard\":null}],\"cType\":\"PK\"}}}],\"client\":{\"id\":\"DB\",\"v\":\"16040000\",\"type\":\"IPH\",\"name\":\"DB Navigator\"},\"ext\":\"DB.R15.12.a\",\"ver\":\"1.16\",\"auth\":{\"type\":\"AID\",\"aid\":\"n91dB8Z77MLdoR0K\"}}",
    "headers": {
        "Content-Type": "application/json",
        "Accept": "application/json",
        "user-agent": "https://github.com/public-transport/hafas-client"
    },
    "query": {
        "checksum": "0d8186da7b06f9cc094075a2a6e21b00"
    }
}

Response not in debug mode

{
    "ver": "1.16",
    "ext": "DB.R15.12.a",
    "lang": "eng",
    "id": "",
    "err": "PARSE",
    "svcResL": []
}

I have compared the requests. Here you can see the difference between the two request. https://www.diffnow.com/?report=pvuq7 The problem is outDate, outTime and checksum. Somebody can help me?

@react-native-bot
Copy link
Collaborator

It looks like your issue may be incomplete. Are all the fields required by the Issue Template filled out?

If you believe your issue contains all the relevant information, let us know in order to have a maintainer remove the No Template label.

@hramos
Copy link
Contributor

hramos commented Jun 14, 2018

Please make sure to follow one of the provided templates when opening an issue: https://github.com/facebook/react-native/issues/new/choose

@facebook facebook locked as resolved and limited conversation to collaborators Jun 14, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jun 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
3 participants