부분 중단share-external
Facebook SDK config file making call to localhost
13

Since 5th September, our internal JS error tracking has been flagging failed fetch requests to localhost:12387. No changes have been made on our side, and the existing Facebook tracking pixel we use loads via Google Tag Manager.

Specifically, on closer inspection, the config file found at - https://connect.facebook.net/signals/config/ - has this chunk of code within it that tries to make a call to localhost.

(function(a,b,c,d){var e={exports:{}};e.exports;(function(){var f=a.fbq;f.execStart=a.performance&&a.performance.now&&a.performance.now();if(!function(){var b=a.postMessage||function(){};if(!f){b({action:"FB_LOG",logType:"Facebook Pixel Error",logMessage:"Pixel code is not installed correctly on this page"},"*");"error"in console&&console.error("Facebook Pixel Error: Pixel code is not installed correctly on this page");return!1}return!0}())return;f.__fbeventsModules||(f.__fbeventsModules={},f.__fbeventsResolvedModules={},f.getFbeventsModules=function(a){f.__fbeventsResolvedModules[a]||(f.__fbeventsResolvedModules[a]=f.__fbeventsModulesa);return f.__fbeventsResolvedModules[a]},f.fbIsModuleLoaded=function(a){return!!f.__fbeventsModules[a]},f.ensureModuleRegistered=function(b,a){f.fbIsModuleLoaded(b)||(f.__fbeventsModules[b]=a)});

f.ensureModuleRegistered("SignalsFBEvents.plugins.actionid",function(){

return function(a,b,c,d){var e={exports:{}};e.exports;(function(){"use strict";var a=f.getFbeventsModules("SignalsFBEventsPlugin"),b=f.getFbeventsModules("SignalsFBEventsEvents"),c=b.setFBP,d=f.getFbeventsModules("signalsFBEventsGetIsAndroid"),g=f.getFbeventsModules("signalsFBEventsGetIsAndroidIAW");b=f.getFbeventsModules("SignalsFBEventsLogging");var h=b.logError;b=f.getFbeventsModules("SignalsFBEventsLocalStorageUtils");var i=b.getLocalStorageItem,j=b.setLocalStorageItem,k=b.isLocalStorageSupported,l=2,m=0;e.exports=new a(function(a,b){if(g()||!d()||!k())return;c.listen(function(a,c){if(a==null||c==null||c===""||m>=l)return;a=b.pluginConfig.get(a,"actionID");if(a==null)return;var d=a.portNumber;a=a.ttlInHour;var e="aidTime",f=i(e);if(f!=null&&(new Date().getTime()-Number(f))/(1e36060)<a)return;m++;fetch("http://localhost:"+d+"/?aid="+encodeURIComponent(c)).then(function(a){a.ok&&j(e,new Date().getTime())})["catch"](function(a){a.message="[ActionID Error] "+a.message,h(a)})})})})();return e.exports}(a,b,c,d)});e.exports=f.getFbeventsModules("SignalsFBEvents.plugins.actionid");f.registerPlugin&&f.registerPlugin("fbevents.plugins.actionid",e.exports);

f.ensureModuleRegistered("fbevents.plugins.actionid",function(){

return e.exports})})()})(window,document,location,history);

Can anyone advise why a request exists in this file for localhost in production?

Olly
질문함 약 2개월 전
Peter

I'm seeing this too, any word from Facebook about this?

9월 22일 오후 8:33
Nuttakit

same here

9월 23일 오전 3:09
Olly

No word from Facebook, raised a ticket but have just got arbitrary stuff back so far. Will update if I get to the bottom of it

9월 24일 오전 3:19
Daniel

I'm also see this. Thanks in advance, Olly!

9월 26일 오후 1:07
Nemrod

Same here...

9월 27일 오후 1:20
Olly

This seems to be fixed on my SDK as of 1st October between 19:00 and 20:00 BST. No acknowledgement has come from Meta at all on this though. My support request with them got a generic response and then ignored thereafter.

10월 21일 오전 3:16
Olly

It's a shame accountability hasn't been taken, we rely on these tools to work properly and have no control over them so at the very least we should be given an explanation on what went wrong. But I assume the truth of the matter is a developer pushed their local code live and it wasn't QA'd properly.

10월 21일 오전 3:19
Robert

Still getting this but now it's a websocket connection

https://connect.facebook.net/signals/config/330423837344621?v=2.9.173&r=stable

e.exports = new a(function(a, b) {
    if (g() || !d() || !k())
        return;
    c.listen(function(a, c) {
        if (a == null || c == null || c === "" || n >= l)
            return;
        a = b.pluginConfig.get(a, "actionID");
        if (a == null)
            return;
        var d = a.portNumber;
        a = a.ttlInHour;
        var e = i(m);
        if (e != null && (new Date().getTime() - Number(e)) / (1e3 * 60 * 60) < a)
            return;
        n++;
        try {
            var f = new WebSocket("ws://localhost:" + d);
            f.onerror = function(a) {
                h(new Error("[ActionID Error] Send WS error"))
            }
            ;
            f.addEventListener("open", function(a) {
                f.send("aid=" + encodeURIComponent(c)),
                f.readyState === WebSocket.OPEN && j(m, new Date().getTime()),
                f.close()
            })
        } catch (a) {
            a instanceof Error && Object.prototype.hasOwnProperty.call(a, "message") && (a.message = "[ActionID Error] Send WS exception: " + a.message),
            h(a)
        }
    })
}
10월 24일 오전 7:50
Robert

Still getting this but now it's a websocket connection

https://connect.facebook.net/signals/config/330423837344621?v=2.9.173&r=stable

e.exports = new a(function(a, b) {
    if (g() || !d() || !k())
        return;
    c.listen(function(a, c) {
        if (a == null || c == null || c === "" || n >= l)
            return;
        a = b.pluginConfig.get(a, "actionID");
        if (a == null)
            return;
        var d = a.portNumber;
        a = a.ttlInHour;
        var e = i(m);
        if (e != null && (new Date().getTime() - Number(e)) / (1e3 * 60 * 60) < a)
            return;
        n++;
        try {
            var f = new WebSocket("ws://localhost:" + d);
            f.onerror = function(a) {
                h(new Error("[ActionID Error] Send WS error"))
            }
            ;
            f.addEventListener("open", function(a) {
                f.send("aid=" + encodeURIComponent(c)),
                f.readyState === WebSocket.OPEN && j(m, new Date().getTime()),
                f.close()
            })
        } catch (a) {
            a instanceof Error && Object.prototype.hasOwnProperty.call(a, "message") && (a.message = "[ActionID Error] Send WS exception: " + a.message),
            h(a)
        }
    })
}
10월 24일 오전 7:50
Robert

Still getting this but now it's a websocket connection

https://connect.facebook.net/signals/config/330423837344621?v=2.9.173&r=stable

e.exports = new a(function(a, b) {
    if (g() || !d() || !k())
        return;
    c.listen(function(a, c) {
        if (a == null || c == null || c === "" || n >= l)
            return;
        a = b.pluginConfig.get(a, "actionID");
        if (a == null)
            return;
        var d = a.portNumber;
        a = a.ttlInHour;
        var e = i(m);
        if (e != null && (new Date().getTime() - Number(e)) / (1e3 * 60 * 60) < a)
            return;
        n++;
        try {
            var f = new WebSocket("ws://localhost:" + d);
            f.onerror = function(a) {
                h(new Error("[ActionID Error] Send WS error"))
            }
            ;
            f.addEventListener("open", function(a) {
                f.send("aid=" + encodeURIComponent(c)),
                f.readyState === WebSocket.OPEN && j(m, new Date().getTime()),
                f.close()
            })
        } catch (a) {
            a instanceof Error && Object.prototype.hasOwnProperty.call(a, "message") && (a.message = "[ActionID Error] Send WS exception: " + a.message),
            h(a)
        }
    })
}
10월 24일 오전 7:50
Robert

Still getting this but now it's a websocket connection

https://connect.facebook.net/signals/config/330423837344621?v=2.9.173&r=stable

e.exports = new a(function(a, b) { if (g() || !d() || !k()) return; c.listen(function(a, c) { if (a == null || c == null || c === "" || n >= l) return; a = b.pluginConfig.get(a, "actionID"); if (a == null) return; var d = a.portNumber; a = a.ttlInHour; var e = i(m); if (e != null && (new Date().getTime() - Number(e)) / (1e3 * 60 * 60) < a) return; n++; try { var f = new WebSocket("ws://localhost:" + d); f.onerror = function(a) { h(new Error("[ActionID Error] Send WS error")) } ; f.addEventListener("open", function(a) { f.send("aid=" + encodeURIComponent(c)), f.readyState === WebSocket.OPEN && j(m, new Date().getTime()), f.close() }) } catch (a) { a instanceof Error && Object.prototype.hasOwnProperty.call(a, "message") && (a.message = "[ActionID Error] Send WS exception: " + a.message), h(a) } }) }

10월 24일 오전 7:50
Robert

Still getting this but now it's a websocket connection

https://connect.facebook.net/signals/config/330423837344621?v=2.9.173&r=stable

10월 24일 오전 7:50
Robert

``` e.exports = new a(function(a, b) { if (g() || !d() || !k()) return; c.listen(function(a, c) { if (a == null || c == null || c === "" || n >= l) return; a = b.pluginConfig.get(a, "actionID"); if (a == null) return; var d = a.portNumber; a = a.ttlInHour; var e = i(m); if (e != null && (new Date().getTime() - Number(e)) / (1e3 * 60 * 60) < a) return; n++; try { var f = new WebSocket("ws://localhost:" + d); f.onerror = function(a) { h(new Error("[ActionID Error] Send WS error")) } ; f.addEventListener("open", function(a) { f.send("aid=" + encodeURIComponent(c)), f.readyState === WebSocket.OPEN && j(m, new Date().getTime()), f.close() }) } catch (a) { a instanceof Error && Object.prototype.hasOwnProperty.call(a, "message") && (a.message = "[ActionID Error] Send WS exception: " + a.message), h(a) } }) }

10월 24일 오전 7:52
Robert
// e.exports = new a(function(a, b) {
//     if (g() || !d() || !k())
//         return;
//     c.listen(function(a, c) {
//         if (a == null || c == null || c === "" || n >= l)
//             return;
//         a = b.pluginConfig.get(a, "actionID");
//         if (a == null)
//             return;
//         var d = a.portNumber;
//         a = a.ttlInHour;
//         var e = i(m);
//         if (e != null && (new Date().getTime() - Number(e)) / (1e3 * 60 * 60) < a)
//             return;
//         n++;
//         try {
//             var f = new WebSocket("ws://localhost:" + d);
//             f.onerror = function(a) {
//                 h(new Error("[ActionID Error] Send WS error"))
//             }
//             ;
//             f.addEventListener("open", function(a) {
//                 f.send("aid=" + encodeURIComponent(c)),
//                 f.readyState === WebSocket.OPEN && j(m, new Date().getTime()),
//                 f.close()
//             })
//         } catch (a) {
//             a instanceof Error && Object.prototype.hasOwnProperty.call(a, "message") && (a.message = "[ActionID Error] Send WS exception: " + a.message),
//             h(a)
//         }
//     })
// }
10월 24일 오전 7:53
Robert
//         try {
//             var f = new WebSocket("ws://localhost:" + d);
//             f.onerror = function(a) {
//                 h(new Error("[ActionID Error] Send WS error"))
//             }
//             ;
//             f.addEventListener("open", function(a) {
//                 f.send("aid=" + encodeURIComponent(c)),
//                 f.readyState === WebSocket.OPEN && j(m, new Date().getTime()),
//                 f.close()
//             })
//         } catch (a) {
//             a instanceof Error && Object.prototype.hasOwnProperty.call(a, "message") && (a.message = "[ActionID Error] Send WS exception: " + a.message),
//             h(a)
//         }
//     })
10월 24일 오전 7:53
Robert
//         try {
//             var f = new WebSocket("ws://localhost:" + d);
//             f.onerror = function(a) {
//                 h(new Error("[ActionID Error] Send WS error"))
//             }
10월 24일 오전 7:53
선택한 답변
1

Another +1 here, and my client is in the EU region. I posted something similar to the forums (https://developers.facebook.com/community/threads/937149104821259/), but haven't heard anything.

9월 30일 오전 7:36
Dermot
1

Same here in Taipei

9월 30일 오후 11:49
Rory Huang
1

Hi guys, any update here? We're seeing it too. Though it seems it appears in console only sometimes, not all the time.

10월 3일 오전 1:42
Kuba
Kuba

Update: The error in console occurs only when we click on "Toggle device toolbar"

10월 3일 오전 2:40
1

same

10월 4일 오전 1:42
Maytas
1

Same here

10월 4일 오전 5:53
Nicolas
1

same here

10월 8일 오전 2:55
Arildo
1

same here

10월 8일 오후 1:08
Kauan
1

Same here. This is affecting the accuracy of advertisements. I can check with the relevant user agent for Androids

10월 15일 오전 1:48
Hitoshi Kojima
1

Same here, this error looks pretty ugly. Why is Facebook trying to connect to localhost? It looks very shady

10월 29일 오전 1:33
Daniel Wróblewski
1

Same issue here.

I spoke with Meta support on the phone and even shared a video showing the error and the exact line of code where it occurs. The pixel version affected on my site is v2.9.174. I was told they'll escalate the issue to the appropriate team.

The more attention we bring to this, the quicker it might get fixed, so I think others could report the issue too.

10월 29일 오후 8:05
Jorge
1

Same issue here

10월 31일 오후 1:07
Peeyoosh
1

Same problem here, ongoing since September 2024 (or earlier). Google Analytics shows: WebSocket connection to 'ws://localhost:12387/' failed: Error in connection establishment: net::ERR_NOT_IMPLEMENTED

11월 13일 오전 5:10
Glenn
2

same here in Seoul

9월 24일 오전 12:11
허성훈
3

it been couple weeks now. Any fix on this at all?

10월 9일 오전 3:49
Nuttakit
3

When is someone going to seriously fix this, come on facebook it's not good enough!

10월 9일 오후 12:17
Simon
4

This looks to be resolved now if you want to check.

10월 10일 오전 7:48
Tim
Renato

for me too, thanks!

10월 10일 오전 11:06
5

same here!

9월 23일 오전 11:03
Álvaro