How to fix <Something went wrong. 180 of 228 contacts were uploaded>
Posted: 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
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