eljeffeg / SmartCopy

Chrome extension for copying genealogical data into Geni.com.
15 stars 12 forks source link

Ancestry stopped working #121

Open nlof opened 3 weeks ago

nlof commented 3 weeks ago

Smartcopy from Ancestry profiles stopped working about a week ago. See several reports on this on Geni

The pop-up window shows no details to be copied to Geni... If there is a profile photo, that is the only item that can be copied, nothing else. Parsing issue? Screenshot 2024-06-21 202120

Screenshot 2024-06-21 203621

stbodie commented 1 week ago

Can confirm bug with Ancestry. 1) Even though I have tried many copies, it didn't save it to history. I have to reselect each time.

image

2) THE BIG ISSUE: Copying https://www.ancestry.com/family-tree/person/tree/82811595/person/40470409220/facts to https://www.geni.com/people/Hanford-Weil/6000000031622431034 has no data

image

3) Submitting the update, DOES upload the single photo

image

and adds the reference to the about box.

image

However, when I try to copy again, I still have no memory of the copy in history.

image
stbodie commented 1 week ago

GuyKh would love your eyes on this one? Many thanks!

gitChuckD commented 1 week ago

I'm experiencing the same issues as @stbodie.

GuyKh commented 1 week ago

GuyKh would love your eyes on this one? Many thanks!

Busy time at work. But I'll try to take a look over the next few days

GuyKh commented 1 week ago

Some observation - looks like html parsing issue In Firefox Addon Debug Console (dev tools)

htmlstring
"<html>

<head><script>window.ancestry=window.ancestry||{};Object.defineProperties(ancestry,{userId:{value:'04ad2475-0006-0000-0000-000000000000',writable:!1},marketId:{value:0,writable:!1},siteId:{value:0,writable:!1},mainOrigin:{value:\"https://www.ancestry.com/\",writable:!1}})</script><script>(()=>{let e=window.ancestry=window.ancestry||{};const n={necessary:!0,preference:[\"c6\"],performance:[\"c9\"],analytics1st:[\"c10\"],analytics3rd:[\"c8\",\"c2\"],advertising1st:[\"c11\"],advertising3rd:[\"c7\",\"c3\"],attribution3rd:[\"c12\"]},t=()=>{const e=new URL(window.location).searchParams.get(\"moo\");e&&(document.cookie=`OPTOUTMULTI=${encodeURIComponent(e)}`);let n=null,t=document.cookie.match(/(?:^|; )OPTOUTMULTI=([^;]*)/);return t&&(n={},decodeURIComponent(t[1]).split(\"|\").forEach((e=>{let t=e.indexOf(\":\");n[e.slice(0,t)]=e.slice(t+1)}))),n},o=(e,t)=>{t=t||{};let o=n[e];return Array.isArray(o)?\"0\"==(t[o[0]]||t[o[1]]):o||!1},c=e=>Object.keys(n).filter((n=>o(n,e||{})));e.getConsentControlFlag=e=>o(e,t()),e.getConsentControlFlags=()=>c(t()),e.getConsentControlFlagsAsync=async()=>(async n=>{if(n)return c(n);const o=`${e.mainOrigin}/api/privacy/consent-info`;let r=await fetch(o,{method:\"GET\",mode:\"cors\"});if(r.ok)return c(t());throw new Error(`${r.status} code from ${o}`)})(t())})();</script><script src=\"https://www.ancestrycdn.com/webui-unifiedtracking/1.0.309/request-header-overrides.js\"></script><script src=\"https://www.ancestrycdn.com/webui-unifiedtracking/1.0.309/unified-tracking-stub.js\"></script><!-- Google Tag Manager --><script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='[https://www.googletagmanager.com/gtm.js?id='+i+dl](https://www.googletagmanager.com/gtm.js?id=%27+i+dl)   ;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-PF2LHSF');</script><!-- End Google Tag Manager --><script async src=\"https://www.ancestrycdn.com/ui-static/lib/p13n/0.0.6/p13n.min.js\"></script><title>502 Bad Gateway</title><script defer src=\"https://www.ancestrycdn.com/banners/2/banners-injection.min.js\"></script></head>

<body>

<center><h1>502 Bad Gateway</h1></center>

</body>

<script>window.unifiedTrackingConfig={options:{autoStartTracking:true,enableLogging:false,useTagManagement:false,loadTrackingLibrary:false},vendors:[{name:\"adobemc\",consent:\"analytics3rd\",config:{}}]};</script><script defer src=\"https://www.ancestrycdn.com/webui-unifiedtracking/1.0.309/unified-tracking.js\"></script></html>

Note the 502.

I'll check this later at home with Chrome

GuyKh commented 1 week ago

Also - as a fix - I suggest extracting PersonCard js object and extracting data from it (rather then fetching fields) image

mamsterla commented 16 hours ago

I am going to be working on this to fix the issue. @GuyKh I will see if the script is readable by the plugin to avoid parsing extra stuff. The 502 bad gateway is usually a bad URL or something similar - most of the time I have seen it was due to some stale API url being used.

GuyKh commented 4 hours ago

@mamsterla I'm already about 60% in this. This is basically rewriting the plugin :/