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

Ios 15.5 issue requesting connection with mobile connection instead of wifi #3699

Open
DurankGts opened this issue Apr 21, 2023 · 10 comments
Open
Assignees

Comments

@DurankGts
Copy link
Contributor

DurankGts commented Apr 21, 2023

I have found a problem trying to connect to google api using mobile connection instead wifi. in ios: 15.5 . using ios 16.4.1 don't fail. I check in the real device iphone 13 pro max ios 15.5.

with wi-fi
image

with mobile data
image

test case.
just execute the method ssueRequestingDataIos() in you star() app test case.

//----------------------------------------------------------
//ISSUE:21-04-23 11:21AM
//----------------------------------------------------------
private void issueRequestingDataIos() {

         Form hi = new Form("issueRequestingInIos15.5", new BorderLayout());
         hi.setName("formRequestPermission");
         hi.setUIID("MyForm");
         hi.setSafeArea(true);
         hi.setFormBottomPaddingEditingMode(true);
         hi.setScrollableY(false);
         
        Button rp = new Button("Request","ecs_btnSos2");
        rp.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent evt) {
                 requestDataFromInternet();
             }
         });
        hi.add(BorderLayout.CENTER, FlowLayout.encloseCenterMiddle(rp));
        hi.show();
         
    }
    //----------------------------------------------------------
    public static void requestDataFromInternet() {

        try {
            ConnectionRequest req = new ConnectionRequest() {
                @Override
                protected void handleErrorResponseCode(int code, String message) {
                    if (code == 400) {
                        //Do what you want here
                        
                    } 
                    Dialog.show("Error: " + code, message+"\n"+" Do you want to continue", "YES","NOT");
                }
                @Override
                protected void buildRequestBody(OutputStream os) throws IOException {
                    super.buildRequestBody(os); //To change body of generated methods, choose Tools | Templates.
                }
                @Override
                protected void readResponse(InputStream input) throws IOException {
                    //super.readResponse(input); //To change body of generated methods, choose Tools | Templates.
                    
                    try {
                        String dataFromServer = Util.readToString(input, "UTF-8");
                        
                        JSONObject data = new JSONObject(dataFromServer);
                        System.out.println("response:" + data.toString());
                        
                        Dialog.show("Data", data.toString(), "CONTINUE", "NOT");
                    } catch (IOException e) {
                        System.out.println("Error1:" + e.toString());
                    } catch (JSONException e) {
                        System.out.println("Error2:" + e.toString());
                    }
                }
            };
            req.setUrl("https://maps.googleapis.com/maps/api/geocode/json");
            req.setPost(false);
            req.addArgument("key", "use your google key please to test");
            req.addArgument("latlng", "18.47940305,-69.93038722");
            req.addArgument("language", "es");
            req.setFailSilently(false);
            req.setReadResponseForErrors(true);
            req.addResponseListener(new ActionListener<NetworkEvent>() {
                @Override
                public void actionPerformed(NetworkEvent evt) {
                   System.out.println("Error25:" + evt.getMessage());
                }
            });
            NetworkManager.getInstance().addToQueueAndWait(req);
        } catch (Exception e) {
            System.out.println("Error" + e.toString());
        }
    //----------------------------------------------------------
@DurankGts
Copy link
Contributor Author

DurankGts commented Apr 21, 2023

please check you support mail with more details

@DurankGts
Copy link
Contributor Author

any solution about this issue?

@shai-almog
Copy link
Collaborator

Was this resolved?

@DurankGts
Copy link
Contributor Author

not, the problem it continue failing in ios 15.5 compiled yesterday at 18:22 hour in dominican republic

@DurankGts
Copy link
Contributor Author

hi again. this issue is ocurring now in ios 16.6.1. You can use the same test case up. I don't know why you aren't solved this issue that is very critical.

@shai-almog
Copy link
Collaborator

This sounds like a problem with your mobile provider. It's not something we can debug without a test case or something to go on.

@DurankGts
Copy link
Contributor Author

DurankGts commented Sep 20, 2023

I don't know what happens but my app failed the connection in mobile data. I attached up a test case that I tested in ios 15.5. Yesterday my app fail testing in ios 16.6.1 but when I compile again the app doesn'fail. I check my provider and I had connection. I simple can't understand why fail my compiled app althought internet connection.

@DurankGts
Copy link
Contributor Author

the app is failing again using mobile data. Please use the test case up. I'm completely sure that theres some problems

@DurankGts
Copy link
Contributor Author

I change my internet provider and the app fail again

@shai-almog
Copy link
Collaborator

I don't have an older iOS device lying around to try that. If it works on a newer device but fails on that device I can't think of another reason other than a problem in the device or its ISP configuration. Assuming that's the case, even if I had an older device around I wouldn't be able to reproduce this.

I can send you down the path of debugging with wireshark to prove that but I think it would be a waste of your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants