# What is it that breaks CreateUUID in Mathematica 10.4.1 and how can I fix it?

All of a sudden my Mathematica 10.4.1 installation which worked well for several years does behave very strange. For example when I evaluate:

CreateUUID[]


this either returns unevaluated or creates a bunch of error messages about cloud connections. My suspection is that this is related with the paclet CloudObject-12.1.28. If I delete that it will be recreated and depending on whether I do a PacletManagerRebuildPacletData after that I either see error messages about some Cloud functionality or CreateUUID returns unevaluated. This started on three independent computers last night, so I suspect that it is not a broken installation but somehow related to changes in the WRI server setup. There seem to be other functions which create similar problems and cause some of my automated scripts to fail, but so far I haven't been able to locate which functions these are.

My question is: Does anyone see similar problems or has an idea how I can fix this?

Here are the error messages for reference:

SetDelayed::wrsym: Symbol CloudObjectInternal$ActiveCloudConnection is Protected. >> Set::wrsym: Symbol$WolframCloudBase is Protected. >>

Attributes::locked: Symbol $WolframCloudBase is locked. >> SetDelayed::write: Tag CloudObjectInformationData in MakeBoxes[BoxForma_CloudObjectInformationData,BoxFormfmt_] is Protected. >> TagSetDelayed::write: Tag PermissionsGroup in DeleteObject[grp_PermissionsGroup] is Protected. >> TagSetDelayed::write: Tag PermissionsKey in DeleteObject[key_PermissionsKey] is Protected. >> CloudFunction::nonopt: Options expected (instead of opts:OptionsPattern[]) beyond position 2 in CloudFunction[fn:Except[_Failure],head_:(##1&),opts:OptionsPattern[]]. An option must be a rule or a list of rules. >>  • If it turns out to be a bug and you cannot upgrade - you could use this to work around it: myuuid[]:=StringJoin[Riffle[IntegerString[RandomInteger[2^(#*4)-1],16,#]&/@{8,4,4,4,12}, "-"]] Jul 17, 2020 at 12:29 • I indeed can not upgrade and running my own uuid-function is what I have been trying as a first fix. Unfortunately there are other functions used in my code which trigger the same warning messages and the scripts I am running are tests which do test for messages and these tests thus fail. I think I will further investigate and add everything I find to the question... Jul 17, 2020 at 13:21 • The autoloading for CreateUUID changed in a paclet update that was recently released, and unfortunately it isn't working as expected in 10.4. The workaround is to load the CloudObject paclet before using CreateUUID, as you showed in your answer below. Jul 17, 2020 at 20:02 ## 1 Answer As this is about a legacy version only I doubt there will be much interest from other users or WRI to have a closer look so the best answer I probably can expect is the workaround I found. It looks like there is no real problem except for these messages which are all about redefinitions of protected symbols or definitions which don't work when there are other definitions for the same symbol already existing. Both are shown because for some yet unknown reason the "CloudObject"-package is obviously loaded twice, presumingly because the code responsible for loading paclets in general or the "CloudObject"-package in particular has changed in some way between version 10 and newer versions. To suppress the warning messages (and make my automated tests which contain checks for messages) it seems to be good enough to once do:  Quiet[Block[{$ContextPath}, Needs["CloudObject"]]];


before my tests starts and everything then works as expected, this suppresses the messages and also guarantees that the CreateUUID function will work as expected.