Search Unity

Are there any workarounds yet for the IAP errors in 2019?

Discussion in 'Unity IAP' started by Divinitize1, Jun 15, 2019.

  1. Divinitize1

    Divinitize1

    Joined:
    May 27, 2019
    Posts:
    101
    I feel that my project is at a standstill at the moment.
    I'm at the point where I need to add and test IAP, I've imported the Purchasing folders, the UDP folder, and the UnityChannel folder from the services panel.

    Doing so has given me 5 total errors.

    Assembly 'Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll' will not be loaded due to errors:
    Reference has errors 'Stores'.
    Assembly 'Library/ScriptAssemblies/Assembly-CSharp.dll' will not be loaded due to errors:
    Reference has errors 'Assembly-CSharp-firstpass'.
    Assembly 'Library/ScriptAssemblies/Assembly-CSharp-Editor-firstpass.dll' will not be loaded due to errors:
    Reference has errors 'Assembly-CSharp-firstpass'.
    Assembly 'Assets/Plugins/UnityPurchasing/Bin/Editor.dll' will not be loaded due to errors:
    Reference has errors 'Stores'.
    Assembly 'Assets/Plugins/UnityPurchasing/Bin/Stores.dll' will not be loaded due to errors:
    Unable to resolve reference 'UnityEngine.UI'. Is the assembly missing or incompatible with the current platform?
    Reference validation can be disabled in the Plugin Inspector.

    I've also tried deleting these folders and importing from the asset store instead with still the same errors.

    I'll admit I probably made an error when I created my project using 2019.3.0a3 an Alpha version.
    But as you can't downgrade projects and these errors seem to have no fix what am I to do?
    The only suggestions I have found in similar threads are to reimport them, delete and reimport from the asset store, etc, all with the same issue.

    Any help would be very much appreciated as I feel time is being wasted.

    I'll add one further question to this post to save me making another one, when all this does eventually get fixed, am I supposed to create my IAP products in both the unity dashboard and the google dashboard?
    I'm finding that part a little counter-intuitive and documentation conflicting.

    THANKS!
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,769
    Well as you noticed by self, you have consciously choose alpha version, expecting possible issues and oven depreciations of test features.

    Yes bugs will be resolved at some point. But I wouldn't hold my breath for next immediate stable release.

    You can be that far in project if you started it in 2019.3.x.
    So remaking it in earlier version wouldn't be much hassle.

    Most of assets, like scripts, images, models, you can simply copy. And reimport assets.

    Also, read carefully, for which version asset has been released and tested.
     
  3. Divinitize1

    Divinitize1

    Joined:
    May 27, 2019
    Posts:
    101
    I'm 3+ weeks into this project maybe it was a slightly earlier alpha version I started on.
    My main point of this thread is to see if there are any workarounds for these issues yet.
    I'd rather not waste more time trying to copy and paste assets into a new stable branch if I can help it.
    But if that's what's needed I don't have much choice.
    I appreciate the reply regardless, I'll just hope that someone else has run into similar issues and found a quick fix before i go down that route.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  5. Divinitize1

    Divinitize1

    Joined:
    May 27, 2019
    Posts:
    101
    I have just tried again with the same exact problem on a fresh project using Unity 2019.3.0a5.
    However, I tried it using Unity 2019.1.6f1 and I was glad to see it imported with no errors.

    I tried my luck at copy and pasting the files over to my Alpha project but sadly this didn't work with the same errors showing.

    Do you have any more suggestions or anything I can try or am I completely screwed and have to try and downgrade my entire project?

    Also just tried copy and replacing the good working Library files to my alpha project with no results.
     
    Last edited: Jun 16, 2019
  6. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,769
    You can copy files like media, or cs files. But you can not copy Ynity generated files, like i.e. prefabs, or scene, without additional workarounds. What you can try, is to export your assets inside Unity. Then import in new project. Can not guarantee it will work, if you got errors. Then just go back to the point, when you didn't have errors. Then export.
     
  7. Divinitize1

    Divinitize1

    Joined:
    May 27, 2019
    Posts:
    101
    Thanks for the reply again, If Jeff doesn't have any more suggestions that can avoid that ill give it a go, my main problem at the moment is my scene setup is very complicated it has a lot of objects, UI and script references all over the place, if I can't export the whole scene as is it could potentially take me days to remake it from scratch so I hope I can try enough things to avoid that if I can.

    LPT don't create your project on an alpha version.
     
  8. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,769
    Just for future notice, when opening Unity beta / alpha (https://unity3d.com/unity/beta), there is clear notification

     
  9. Divinitize1

    Divinitize1

    Joined:
    May 27, 2019
    Posts:
    101
    I'm making some progress towards downgrading to stable. exported all my assets, scripts, reimported all my 3rd party plugins, ads, IAP, etc..
    Even the scene came over almost completely intact.
    It seems at the moment the only issue is it doesn't like importing Canvas, and annoyingly that's one of the things in my project so far that's most complicated and would be a pain in the arse to redo.
    Are you aware of any methods for downgrading canvas?
    I found a couple of posts online that say exporting it works, however, that only works for the same project versions.
    I've also tried turning them into prefabs and exporting them that way but the same issue, the canvas comes over in the right order but for instance, any Images in the canvas only have Rect transforms and not the image itself.
     
  10. Divinitize1

    Divinitize1

    Joined:
    May 27, 2019
    Posts:
    101
    Another update.
    Took me 5.5 hours but finally moved my project over to a downgraded stable version and fixed most errors with the Canvas UI stuff.

    Have 2 problems now.
    -When I build, Unity seems to think I have a 3rd scene or something as I'm still getting errors of missing scripts and references (in scene ") .. Doesn't give me a scene name, there's only my loading scene and main scene in the build settings too.
    -It builds successfully however it crashes on startup on my android device.
    I have tried using the adb command line debug but It doesn't log anything unless it gets passed the crash.
    Are there any other ways to debug this or anything that could be causing it considering I have manually downgraded?

    I have manually reimported all 3rd party plugins and scripts to the new version.
     
  11. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,769
    try recreate same 3rd scene as in original project, if that was the case.
    Double clicking on error message does not help?
    What error you get exactly? copy it here.
     
  12. Divinitize1

    Divinitize1

    Joined:
    May 27, 2019
    Posts:
    101
    Thanks for the reply, I never actually had a 3rd scene,
    Usually i got all these errors when i hit play, but as i went through both my only 2 scenes and fixed them it now only shows after build has been successful.

    There's about 150 total (cautions? !, not warnings)

    Script attached to 'XPBar' in scene '' is missing or no valid script is attached.
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    all similar with the different assets etc,

    As for the crashing on startup, I still haven't managed to find or get an error from anything.
    First time using adb logcat and it does not give me any output when it crashes.
     
  13. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,769
    search for XPBar in Hierarchy. Does object exists?
    If so, look into inspector for any missing script references.
     
  14. Divinitize1

    Divinitize1

    Joined:
    May 27, 2019
    Posts:
    101
    Yes sorry, this is what I tried to explain,
    When i downgraded all my project the only real problem was the canvas stuff, Images, etc were left with the missing script errors instead of "image" etc, I painstakingly went through all of them and fixed them all. There are no errors on play or anything like that. only after it builds.
     
  15. Divinitize1

    Divinitize1

    Joined:
    May 27, 2019
    Posts:
    101
    Only thing I can manage to get from adb logcat is this, replaced my game and company name with MYGAMEHERE.
    For the android crashes. or "stopped working"

    06-17 00:24:32.296 3639 4784 I ActivityManager: Start proc 28491:com.MYGAMEHERE/u0a459 for activity MYGAMEHERE/com.unity3d.player.UnityPlayerActivity
    06-17 00:24:32.361 3639 5105 W ActivityManager: Force finishing activity com.MYGAMEHERE/com.unity3d.player.UnityPlayerActivity
    06-17 00:24:32.868 3639 3656 W ActivityManager: Activity pause timeout for ActivityRecord{77e9244d0 u0 com.MYGAMEHERE/com.unity3d.player.UnityPlayerActivity t462 f}
    06-17 00:24:32.872 3639 3656 I WindowManager: Failed to capture screenshot of Token{60d2f2d ActivityRecord{77e9244d0 u0 com.MYGAMEHERE/com.unity3d.player.UnityPlayerActivity t462 f}} appWin=Window{7df83c8d0 u0 Starting MYGAMEHERE} drawState=4
    06-17 00:24:43.377 3639 3656 W ActivityManager: Activity destroy timeout for ActivityRecord{77e9244d0 u0 com.MYGAMEHERE/com.unity3d.player.UnityPlayerActivity t462 f}
     
  16. Divinitize1

    Divinitize1

    Joined:
    May 27, 2019
    Posts:
    101
    GOOD NEWS EVERYBODY,

    Got it working on android,
    After spending ages googling possible fixes, something finally hit me, I changed the version number in the android manifest on my old main version and it didn't match up with the new version , I can only presume something in one of the exported and reimported assets was looking for that version number and refused it to open.

    My only problem now is the 150 cautions from missing scripts, even though i assure you i have replaced and fixed them all in my scenes.
    Would there be a file somewhere that's kept tabs on scene objects and just hasn't been updated? hopefully i can delete it or something. It doesn't appear to be affecting building or running though, just cautioning me.

    Thanks for help with the other problems.
     
  17. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    @Divinitize1 You are beginning to ask non-IAP questions, you will likely get better help in the General or Android forums.