Safari Localhost Permission Blocked











up vote
24
down vote

favorite
1












So ran into this issue today, where I have a website that needs the geolocation of the user. It was working fine when running locally on localhost, but now I get an error saying "Access to geolocation was blocked over insecure connection to http://localhost:4200". WTF Apple? I also tried 127.0.0.1 but got the same result. Am I missing something in the dev settings or did Apple just break everything?



Safari Version: 9.1.3 (11601.7.8)










share|improve this question




















  • 2




    Have this issue too with Ionic development. Safari seems to block even localhost where Chrome allows geolocation permissions on localhost. Unhelpful if your development is Safari browser of choice.
    – Ian Tearle
    Oct 13 '16 at 9:41










  • Yeah, this is definitely a Safari bug, it just makes testing this stuff that much harder.
    – trev9065
    Oct 13 '16 at 15:01










  • Having the same issue, was a solution ever found?
    – halfacreyum
    Nov 11 '16 at 1:07






  • 1




    No, there is no solution at the moment.
    – trev9065
    Nov 14 '16 at 20:51










  • More than a year later: are we still in the dark? I can bypass ATS on localhost with a property but absolutely cannot get Geolocation API to work.
    – Heits
    Jan 30 at 22:37















up vote
24
down vote

favorite
1












So ran into this issue today, where I have a website that needs the geolocation of the user. It was working fine when running locally on localhost, but now I get an error saying "Access to geolocation was blocked over insecure connection to http://localhost:4200". WTF Apple? I also tried 127.0.0.1 but got the same result. Am I missing something in the dev settings or did Apple just break everything?



Safari Version: 9.1.3 (11601.7.8)










share|improve this question




















  • 2




    Have this issue too with Ionic development. Safari seems to block even localhost where Chrome allows geolocation permissions on localhost. Unhelpful if your development is Safari browser of choice.
    – Ian Tearle
    Oct 13 '16 at 9:41










  • Yeah, this is definitely a Safari bug, it just makes testing this stuff that much harder.
    – trev9065
    Oct 13 '16 at 15:01










  • Having the same issue, was a solution ever found?
    – halfacreyum
    Nov 11 '16 at 1:07






  • 1




    No, there is no solution at the moment.
    – trev9065
    Nov 14 '16 at 20:51










  • More than a year later: are we still in the dark? I can bypass ATS on localhost with a property but absolutely cannot get Geolocation API to work.
    – Heits
    Jan 30 at 22:37













up vote
24
down vote

favorite
1









up vote
24
down vote

favorite
1






1





So ran into this issue today, where I have a website that needs the geolocation of the user. It was working fine when running locally on localhost, but now I get an error saying "Access to geolocation was blocked over insecure connection to http://localhost:4200". WTF Apple? I also tried 127.0.0.1 but got the same result. Am I missing something in the dev settings or did Apple just break everything?



Safari Version: 9.1.3 (11601.7.8)










share|improve this question















So ran into this issue today, where I have a website that needs the geolocation of the user. It was working fine when running locally on localhost, but now I get an error saying "Access to geolocation was blocked over insecure connection to http://localhost:4200". WTF Apple? I also tried 127.0.0.1 but got the same result. Am I missing something in the dev settings or did Apple just break everything?



Safari Version: 9.1.3 (11601.7.8)







safari permissions geolocation localhost






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 12 '16 at 18:14

























asked Sep 30 '16 at 18:09









trev9065

1,33421839




1,33421839








  • 2




    Have this issue too with Ionic development. Safari seems to block even localhost where Chrome allows geolocation permissions on localhost. Unhelpful if your development is Safari browser of choice.
    – Ian Tearle
    Oct 13 '16 at 9:41










  • Yeah, this is definitely a Safari bug, it just makes testing this stuff that much harder.
    – trev9065
    Oct 13 '16 at 15:01










  • Having the same issue, was a solution ever found?
    – halfacreyum
    Nov 11 '16 at 1:07






  • 1




    No, there is no solution at the moment.
    – trev9065
    Nov 14 '16 at 20:51










  • More than a year later: are we still in the dark? I can bypass ATS on localhost with a property but absolutely cannot get Geolocation API to work.
    – Heits
    Jan 30 at 22:37














  • 2




    Have this issue too with Ionic development. Safari seems to block even localhost where Chrome allows geolocation permissions on localhost. Unhelpful if your development is Safari browser of choice.
    – Ian Tearle
    Oct 13 '16 at 9:41










  • Yeah, this is definitely a Safari bug, it just makes testing this stuff that much harder.
    – trev9065
    Oct 13 '16 at 15:01










  • Having the same issue, was a solution ever found?
    – halfacreyum
    Nov 11 '16 at 1:07






  • 1




    No, there is no solution at the moment.
    – trev9065
    Nov 14 '16 at 20:51










  • More than a year later: are we still in the dark? I can bypass ATS on localhost with a property but absolutely cannot get Geolocation API to work.
    – Heits
    Jan 30 at 22:37








2




2




Have this issue too with Ionic development. Safari seems to block even localhost where Chrome allows geolocation permissions on localhost. Unhelpful if your development is Safari browser of choice.
– Ian Tearle
Oct 13 '16 at 9:41




Have this issue too with Ionic development. Safari seems to block even localhost where Chrome allows geolocation permissions on localhost. Unhelpful if your development is Safari browser of choice.
– Ian Tearle
Oct 13 '16 at 9:41












Yeah, this is definitely a Safari bug, it just makes testing this stuff that much harder.
– trev9065
Oct 13 '16 at 15:01




Yeah, this is definitely a Safari bug, it just makes testing this stuff that much harder.
– trev9065
Oct 13 '16 at 15:01












Having the same issue, was a solution ever found?
– halfacreyum
Nov 11 '16 at 1:07




Having the same issue, was a solution ever found?
– halfacreyum
Nov 11 '16 at 1:07




1




1




No, there is no solution at the moment.
– trev9065
Nov 14 '16 at 20:51




No, there is no solution at the moment.
– trev9065
Nov 14 '16 at 20:51












More than a year later: are we still in the dark? I can bypass ATS on localhost with a property but absolutely cannot get Geolocation API to work.
– Heits
Jan 30 at 22:37




More than a year later: are we still in the dark? I can bypass ATS on localhost with a property but absolutely cannot get Geolocation API to work.
– Heits
Jan 30 at 22:37












2 Answers
2






active

oldest

votes

















up vote
1
down vote













Maybe it's possible to use https ( How to get angular-cli to ng serve over HTTPS ) and if not is possible directly for some reason maybe you can use a transparent proxy that offers https.



Many HTML5 new features like access to webcam, geolocation and others are now allowed only on pages served thru https scheme, so probably using https will work again. If not, maybe is possible to modify hosts file to workaround the problem.






share|improve this answer






























    up vote
    0
    down vote













    I found a sort of solution but it is a bit tedious. I use ngrok to route my server and then the geolocation works fine. The only thing I don't like is that it has limits (if you are using free account), like you can't refresh a lot of times.



    edit:



    To Use ngrok download it first, then on terminal type



    ./ngrok http <port number>


    ngrok example.
    It will then show you the url routes. I used https. Go to to that address.



    More ngrok instructions and download






    share|improve this answer



















    • 1




      (As reviewer), I'm pretty familiar with most of the technologies in the question's problem description, but I'm not clear on how I'd put your answer to work. Can you give it a little more backstory? TIA.
      – benc
      Nov 11 at 22:45











    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f39797559%2fsafari-localhost-permission-blocked%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    Maybe it's possible to use https ( How to get angular-cli to ng serve over HTTPS ) and if not is possible directly for some reason maybe you can use a transparent proxy that offers https.



    Many HTML5 new features like access to webcam, geolocation and others are now allowed only on pages served thru https scheme, so probably using https will work again. If not, maybe is possible to modify hosts file to workaround the problem.






    share|improve this answer



























      up vote
      1
      down vote













      Maybe it's possible to use https ( How to get angular-cli to ng serve over HTTPS ) and if not is possible directly for some reason maybe you can use a transparent proxy that offers https.



      Many HTML5 new features like access to webcam, geolocation and others are now allowed only on pages served thru https scheme, so probably using https will work again. If not, maybe is possible to modify hosts file to workaround the problem.






      share|improve this answer

























        up vote
        1
        down vote










        up vote
        1
        down vote









        Maybe it's possible to use https ( How to get angular-cli to ng serve over HTTPS ) and if not is possible directly for some reason maybe you can use a transparent proxy that offers https.



        Many HTML5 new features like access to webcam, geolocation and others are now allowed only on pages served thru https scheme, so probably using https will work again. If not, maybe is possible to modify hosts file to workaround the problem.






        share|improve this answer














        Maybe it's possible to use https ( How to get angular-cli to ng serve over HTTPS ) and if not is possible directly for some reason maybe you can use a transparent proxy that offers https.



        Many HTML5 new features like access to webcam, geolocation and others are now allowed only on pages served thru https scheme, so probably using https will work again. If not, maybe is possible to modify hosts file to workaround the problem.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 8 '17 at 18:43

























        answered Nov 8 '17 at 18:03









        user1039663

        13318




        13318
























            up vote
            0
            down vote













            I found a sort of solution but it is a bit tedious. I use ngrok to route my server and then the geolocation works fine. The only thing I don't like is that it has limits (if you are using free account), like you can't refresh a lot of times.



            edit:



            To Use ngrok download it first, then on terminal type



            ./ngrok http <port number>


            ngrok example.
            It will then show you the url routes. I used https. Go to to that address.



            More ngrok instructions and download






            share|improve this answer



















            • 1




              (As reviewer), I'm pretty familiar with most of the technologies in the question's problem description, but I'm not clear on how I'd put your answer to work. Can you give it a little more backstory? TIA.
              – benc
              Nov 11 at 22:45















            up vote
            0
            down vote













            I found a sort of solution but it is a bit tedious. I use ngrok to route my server and then the geolocation works fine. The only thing I don't like is that it has limits (if you are using free account), like you can't refresh a lot of times.



            edit:



            To Use ngrok download it first, then on terminal type



            ./ngrok http <port number>


            ngrok example.
            It will then show you the url routes. I used https. Go to to that address.



            More ngrok instructions and download






            share|improve this answer



















            • 1




              (As reviewer), I'm pretty familiar with most of the technologies in the question's problem description, but I'm not clear on how I'd put your answer to work. Can you give it a little more backstory? TIA.
              – benc
              Nov 11 at 22:45













            up vote
            0
            down vote










            up vote
            0
            down vote









            I found a sort of solution but it is a bit tedious. I use ngrok to route my server and then the geolocation works fine. The only thing I don't like is that it has limits (if you are using free account), like you can't refresh a lot of times.



            edit:



            To Use ngrok download it first, then on terminal type



            ./ngrok http <port number>


            ngrok example.
            It will then show you the url routes. I used https. Go to to that address.



            More ngrok instructions and download






            share|improve this answer














            I found a sort of solution but it is a bit tedious. I use ngrok to route my server and then the geolocation works fine. The only thing I don't like is that it has limits (if you are using free account), like you can't refresh a lot of times.



            edit:



            To Use ngrok download it first, then on terminal type



            ./ngrok http <port number>


            ngrok example.
            It will then show you the url routes. I used https. Go to to that address.



            More ngrok instructions and download







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Nov 12 at 0:00

























            answered Nov 11 at 22:37









            withcheesepls

            11




            11








            • 1




              (As reviewer), I'm pretty familiar with most of the technologies in the question's problem description, but I'm not clear on how I'd put your answer to work. Can you give it a little more backstory? TIA.
              – benc
              Nov 11 at 22:45














            • 1




              (As reviewer), I'm pretty familiar with most of the technologies in the question's problem description, but I'm not clear on how I'd put your answer to work. Can you give it a little more backstory? TIA.
              – benc
              Nov 11 at 22:45








            1




            1




            (As reviewer), I'm pretty familiar with most of the technologies in the question's problem description, but I'm not clear on how I'd put your answer to work. Can you give it a little more backstory? TIA.
            – benc
            Nov 11 at 22:45




            (As reviewer), I'm pretty familiar with most of the technologies in the question's problem description, but I'm not clear on how I'd put your answer to work. Can you give it a little more backstory? TIA.
            – benc
            Nov 11 at 22:45


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f39797559%2fsafari-localhost-permission-blocked%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Guess what letter conforming each word

            Port of Spain

            Run scheduled task as local user group (not BUILTIN)