How to fix <Something went wrong. 180 of 228 contacts were uploaded>

Need extra help installing your Ooma Hub or Telo system? Let us know.
Post Reply
uncleBob1216
Posts:12
Joined:Tue May 09, 2023 3:46 pm
How to fix <Something went wrong. 180 of 228 contacts were uploaded>

Post by uncleBob1216 » Mon Jun 05, 2023 10:37 am

How to fix <Something went wrong. 180 of 228 contacts were uploaded>
Does anybody have a better way of solving this problem.



I have set my OOMA.com preferences to Block all numbers not in my contacts and send to voicemail.

Unfortunately the OOMA IOS app has a bug and 48 of my contacts were "bad" and could not be upload. I get this message
<Something went wrong. 180 of 228 contacts were uploaded>

Several calls to OOMA support were fruitless. They told me OOMA export does not fully work with iPhones and they had no workarounds.

I ended up working around the problem myself but I am hoping someone in this forum can give me a better way. I am also looking for a way to submit my solution to the ooma developeres.

I took me over 10 hours but here is a very simplified summary.

FIRST TRY:
I had 228 contacts (139 from iCloud, 102 from Gmail, minus 13 duplicates.)
I exported All Contacts and emailed them to my Windows 10 computer where I saved it as "All 228 Contacts.vcf"
I disabled Gmail Contacts on my iPhone, then imported All 228 Contacts.vcf to iCloud.com
After syncing my iPhone the OOMA Contacts upload still showed the error <Something went wrong. 180 of 228 contacts were uploaded>


SECOND TRY
I deleted all iCloud.com contacts and synced my iPhone to verify that it showed No Contacts Available.
I ran the attached "Fix vcf files.xlsm" program. which created "All 228 Contacts FIXED.vcf"
I imported "All 228 Contacts FIXED.vcf" to icloud.com and synced my iPhone.
Now the OOMA Contacts uploads all 228 contacts successfully.

HOW THE VBA CODE IN "Fix vcf files.xlsm" WORKS
Most of the 48 bad contacts were from the 102 contacts in my Gmail account.

When I examined "All 228 Contacts ".vcf I discovered that most of the bad contacts had a .vcf line that OOMA cannot upload.
Original .vcf card had TEL;type=pref:9876549355
FIXED .vcf card has TEL; type=OTHER;type=VOICE;type=pref9876549355

I tried fixing this "error" by using Notepad and making a global find and replace to changed all occurances of TEL;type=pref
That worked pretty well but I discovered some more subtle problems.
Most phone numbers were formatted as (987) 654-9355.
But other phone numbers were not formatted and seemed to cause problems. (examples 19876549355 +18765493559.7654321012)
The .Excel.xlsm file contains logic to reformat all these unformatted phone numbers and strip off the +1 country code.

THIRD TRY
I tried reenabling my iPhone Gmail contacts but that caused the OOMA upload error message to return.
<Something went wrong. 180 of 228 contacts were uploaded>
I also tried going to contacts.google.com where I deleted all 102 contacts and imported "All 228 Contacts FIXED.vcf" but the same upload error still occurred..
Perhaps if I spent another 10 hours I could figure out how to fix gmail contacts, but I gave up.
My iPhone has gmail contacts will remain disabled until OOMA fixes their software.

CONCLUSION
It is irritating that OOMA developers cannot fix their software, but I expect they are busy doing other important work.
But, I still love OOMA. Before OOMA my home phone rang 40 SPAMS a day. Several hours were spent with ATT support agents & supervisors whoe insisted that their anti spam was working as designed.
So I love OOMA 100% of my home phone SPAM calls are being blocked.



It appears that the ooma forum does not allow an xlsm to be attached. The following is the code needs to be put into and excel .xlsm file.

Option Explicit
'Const src = "C:\aatmpH\All Gmail 0529-2023.vcf"
Dim src
'"C:\aatmpH\keep empty\All Gmail.vcf"
'"C:\aatmpH\All Contacts 5-25-23.VCF"

Dim tgt
Sub clean()
src = GetSelectedFilePath
Dim txt As String
Dim fileNumber As Long
fileNumber = FreeFile


tgt = Left$(src, InStrRev(src, ".") - 1)
tgt = tgt & " fixed"
tgt = tgt & Mid(src, InStrRev(src, "."))


Open src For Input As fileNumber
txt = Input(LOF(fileNumber), fileNumber)
Close fileNumber

txt = Rep10(txt) ' <======================== replace 10 digits with formatted






' Check if the file already exists and delete it silently
If Dir(tgt) <> "" Then
On Error Resume Next
SetAttr tgt, vbNormal
Kill tgt
On Error GoTo 0
End If



fileNumber = FreeFile
Open tgt For Output As fileNumber
Print #fileNumber, txt
Close fileNumber
Debug.Print InputBox("Use control C to put the fixed file onto clipboard", , tgt)

End Sub
Function Rep10(inpstr As String) As String
Dim regex As Object
Set regex = CreateObject("VBScript.RegExp")
regex.Global = True
Rep10 = inpstr


' Set the pattern to match 10-digit numbers and replace with the telephone number format

' '
regex.pattern = "(?:\+1|1|\+|\b)(\d{3})(\d{3})(\d{4})\b"
MsgBox regex.Execute(Rep10).Count & " tel;( 10 digit number contacts were reformatted in " & tgt
Rep10 = regex.Replace(Rep10, "($1) $2-$3")

' VVVVVVVVVVV
' change TEL;type=pref:2314600 to TEL;type=OTHER;type=pref:2314600

regex.pattern = "(TEL;)(type=pref)"
MsgBox regex.Execute(Rep10).Count & " tel;type=pref contacts were reformatted in " & tgt
Rep10 = regex.Replace(Rep10, "$1type=OTHER;type=VOICE;$2")


' regex.pattern = "(TEL:\()"
' MsgBox regex.Execute(Rep10).Count & " tel;( contacts were reformatted in " & tgt
' Rep10 = regex.Replace(Rep10, "TEL;type=OTHER;type=VOICE:(")
'

End Function


Sub TestRep10v3()
Dim inputString As String
Dim outputString As String

inputString = " xxxxx TEL;type=pref:(904) 238-1234 yyyyyyyyy TEL:(904) 683-1234"

'"TEL;type=OTHER;type=pref:2314600This is a test string with xxx 1234567890, numbers."


' Call the Rep10 function to replace 10-digit numbers
outputString = Rep10(inputString)

' Display the result
MsgBox outputString
End Sub

Function GetSelectedFilePath() As String
Dim fileDialog As fileDialog
Dim selectedFile As Variant

' Create a FileDialog object as a FilePicker dialog
Set fileDialog = Application.fileDialog(msoFileDialogFilePicker)

' Set the initial directory to user's Downloads folder and filter for .vcf files
fileDialog.InitialFileName = CreateObject("WScript.Shell").SpecialFolders("MyDocuments") & "\Downloads"
fileDialog.Filters.Clear
fileDialog.Filters.Add "VCF Files", "*.vcf"

' Open the FilePicker dialog and capture the selected file
If fileDialog.Show = -1 Then
For Each selectedFile In fileDialog.SelectedItems
' Return the full path of the selected file
GetSelectedFilePath = selectedFile
Exit Function
Next selectedFile
End If

' Clean up the FileDialog object
Set fileDialog = Nothing

' Return an empty string if no file was selected
GetSelectedFilePath = ""
End Function

Robek
Posts:234
Joined:Thu Sep 26, 2019 6:56 pm

Re: How to fix <Something went wrong. 180 of 228 contacts were uploaded>

Post by Robek » Sun Jun 11, 2023 7:22 pm

Another option would have been to just manually add the contacts that didn't upload, (and also to manually double-check the contacts that did upload). That might not seem like a better way, but it probably would have taken much less time than the 10 hours it took to write a script.

Exporting and importing contacts can get messy, partly because different applications define contacts differently, and they don't always agree about how to read/write export files. Converting contacts from one format to another can also introduce data loss or corruption.

The iOS app relies on other applications to create and export the contacts that it's trying to upload; that could be the underlying cause for any buggy export files. Exactly which app(s) are to blame depends on how well they conform to which standards, or even to which versions of the same standards.

For example, the vCard format is substantially different for each version (either 2.1, 3.0, or 4.0), and refers to different standards for the telephone number format, (such as ITU-T X.520 / E.123, or IETF RFC 3966). Some apps only support specific versions.

For something that complicated, Ooma may use third-party libraries to implement it, rather than writing their own code; if that's the case, then directly fixing any issues with the library or adding a user-contributed solution into the mix would be difficult.

Writing a script to solve one problem for one set of contacts can accidentally introduce other problems for a different set of contacts. For example, contacts with international numbers could require an international number format, and non-standard parameters (like "TYPE=other" ?) could cause unexpected issues.

uncleBob1216
Posts:12
Joined:Tue May 09, 2023 3:46 pm

Re: How to fix <Something went wrong. 180 of 228 contacts were uploaded>

Post by uncleBob1216 » Mon Jun 19, 2023 9:59 am

I totally agree with you that writing a script to work around an Ooma bug is a terrible terrible solution.

But, the alternative of manually changing erroneous contacts is only reasonable if I know which accounts are bad.
Unfortunately ooma support told me that that was not possible yet, so I should change all 228 contacts.

Writing a script is not ideal, but ooma tech support's suggestion of #1) manually uploading all 228 contacts to myooma.com would have been incredibly tedious. OR # 2) Manually rebuilding the iPhone contacts would have also worked, but would have been even more tedious, And with either solution 1) or 2), each and every time I added a new contact to the iPhone I would need to remember to verify whether it was erroneous. Otherwise I would end up getting error messages like Something went wrong. 233 of 238 contacts were uploaded. Since there is no way to know which 5 contacts were wrong I would probably see a lot of profanities.

So, my programmatic solution is far far preferable. Once a week I try uploading my contacts, and if there are any errors I run my program to fix them. After a few years, the 10 hours I spent on my script will seem like a real bargain.

uncleBob1216
Posts:12
Joined:Tue May 09, 2023 3:46 pm

Re: How to fix <Something went wrong. 180 of 228 contacts were uploaded>

Post by uncleBob1216 » Mon Jun 19, 2023 10:14 am

If someone wants to manually update only the erroneous contact, the following vba program identifies most of them.

For instance, today I I got the something went wrong messsage.
I created the .vcf and emailed it to my windows maching then ran the program. My program showed me that there were 5 "bad" contacts.
FN:Sharon
TEL;type=pref:(617) 671-6010
FN:Sharon
TEL;type=pref:(617) 671-1000
FN:Arco
TEL;type=pref:+1 (016) 007-0000
FN:MARK
TEL;type=pref:+1 (900) 007-0000
FN:Patty
TEL;type=pref:(016) 000-000
I used the native iPhone contacts app
1) copy each phone number to the clipboard.
2) delete the phone number
3) added the phone number
4) saved the result.
Afterward the upload was successful.


Option Explicit
Const src = "C:\aatmpH\All iCloud.vcf"

Sub CaptureLinesWithRegex()
Dim regex As Object
Set regex = CreateObject("VBScript.RegExp")
regex.Global = True
Dim filecontent As String
Dim fileNumber As Integer
fileNumber = FreeFile
Open src For Input As fileNumber
filecontent = Input$(LOF(fileNumber), fileNumber)
Close fileNumber

regex.Pattern = "\b(?:N\:|FN\:|TEL;type=pref).*?[\r\n\f\v]"

' Match the lines using the pattern
Dim matches As Object
Set matches = regex.Execute(filecontent)

' Process the matches
Dim match As Object, ans As String, prev As String

For Each match In matches

If Left(match, 3) = "TEL" Then ans = ans & prev & match & vbCr
If InStr(Left(match, 4), "N:") > 0 Then
prev = match
End If

Next match
Debug.Print ans
MsgBox ans
End Sub

uncleBob1216
Posts:12
Joined:Tue May 09, 2023 3:46 pm

Re: How to fix <Something went wrong. 180 of 228 contacts were uploaded>

Post by uncleBob1216 » Mon Jun 19, 2023 12:21 pm

The following steps can turn a "good" iPhone contact into a "bad" contact which will give the "something went wrong" error.

This would probably be useful for ooma programming devlopers if they ever want to fix their bugs in the ooma iPhone app. (Stop laughing, they might actually want that someday!)

Step 1. Find any contact like Aaron Anyone that can be successfully uploaded.
Step 2. Open Iphone ooma app > tap …more > tap upload contacts to myooma.com > select Aaron Anyone > Upload Contacts(1) > response should be "Uploaded successfully"
Step 3. Send an email to yourself with the following text in the body "234-567-8888" and wait for it arrive,
Step 4. Open the incoming email and tap/hold on 234-567-8888. You will get this submenu
Call (234) 567-8888
Send Message
FaceTime
FaceTime Audio
Home Phone
Add to Contacts
Copy

Step 5. Tap Add to contacts > Add to existing contacts > Select Aaron Anyone > Update.
Step 6. Rerun step 2 and and Aaron will now get "Something went wrong"
Step 7 Using builtin iPhone contact manager delete 234-567-8888 rerun step 2. It will be successful.
Step 8. You can repeat this script by starting at step 3. (You cannot restart at step 4 for technical reasons.)

Bob

uncleBob1216
Posts:12
Joined:Tue May 09, 2023 3:46 pm

Re: How to fix <Something went wrong. 180 of 228 contacts were uploaded>

Post by uncleBob1216 » Tue Jun 20, 2023 8:52 am

The following is simpler code to identrify most of the "bad" contacts.

Code: Select all

Sub PutBadContactsToClipBoard()
Const src = "c:\aatmph\all icloud.vcf"

Dim ans, prev, line
    Open src For Input As #1

    Do While Not EOF(1)
        Line Input #1, line
        If InStr(line, "TEL;type=pref") > 0 Then
            ans = ans & prev & vbLf & line & vbLf & vbLf
        ElseIf InStr(Left(line, 4), "N:") > 0 Then
            prev = line
        End If
    Loop

    Close #1
    With CreateObject("new:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
        .SetText ans
        .PutInClipboard
    End With
        
    MsgBox "Bad contacts are now on clipboard. Here are some of them:" & vbLf & vbLf & ans
End Sub


uncleBob1216
Posts:12
Joined:Tue May 09, 2023 3:46 pm

Re: How to fix <Something went wrong. 180 of 228 contacts were uploaded>

Post by uncleBob1216 » Wed Jun 28, 2023 7:25 am

I tried tech support again, and this time they agreed to escalate the "something went wrong" problem.

It is under ticket number 230621-003158

I will keep my fingers crossed.

UncleBob

uncleBob1216
Posts:12
Joined:Tue May 09, 2023 3:46 pm

Re: How to fix <Something went wrong. 180 of 228 contacts were uploaded>

Post by uncleBob1216 » Thu Jun 29, 2023 8:58 am

6/29 12L40 pm est.

Froy, from ooma tech support contacted me. The call went smoothly mainly because all of the details are documented in this forum thread. Froy had me send the link, and he will read it carefully then forward it to the engineering support team.

Froy and I agree that a fix to the ooma iPhone app may take quite a while, but luckily the workarounds mentioned above are sufficient for my needs. I encourage other users with the "something went wrong" to call ooma tech support before trying my approaches. Ooma will fix the problem much faster if a lot of people complain.

UncleBob

uncleBob1216
Posts:12
Joined:Tue May 09, 2023 3:46 pm

Re: How to fix <Something went wrong. 180 of 228 contacts were uploaded>

Post by uncleBob1216 » Fri Jun 30, 2023 6:14 am

I have noticed that same ticket numbers 230621-003158 and ticket 230621003187 are being used for two separate ooma problems. it is probably my fault, so I just wanted to point it out.

This problem is still being researched by ooma
How to fix <Something went wrong. 180 of 228 contacts were uploaded
viewtopic.php?f=2&t=24507&sid=49bc49cd0 ... c61ab6710c

This problem has been resolved:
ooma iphone app can create new contact but not 'Save" it
viewtopic.php?f=5&t=24514&sid=49bc49cd0 ... c61ab6710c

Robek
Posts:234
Joined:Thu Sep 26, 2019 6:56 pm

Re: How to fix <Something went wrong. 180 of 228 contacts were uploaded>

Post by Robek » Sat Jul 01, 2023 10:02 am

Posters do not need to include the 'sid' attribute-value pair ("&sid=..."), when posting forum urls. That refers to their session id, which the web site uses to keep track of their login session; it expires once they log out.

Post Reply