Search Unity

[Windows Store App] WWW class throws exception when reading from persistentDataPath

Discussion in 'Windows' started by bubanik, Nov 5, 2013.

  1. bubanik

    bubanik

    Joined:
    Nov 5, 2013
    Posts:
    4
    Hi!
    I'm using www class to wrtie some files to Application.persistentDataPath. All files are saved correctly. But when i try to read them, i get
    Code (csharp):
    1. 'myWWW.data' threw an exception of type 'UnityEngine.UnityException'
    and
    Code (csharp):
    1. file:///C:/Users/user/AppData/Local/Packages/packagename_kx5z7px8ckg18/LocalState/filename cannot be loaded
     
    Last edited: Nov 5, 2013
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,905
    So does this path exists - C:/Users/user/AppData/Local/Packages/packagename_kx5z7px8ckg18/LocalState/filename ?
     
  3. bubanik

    bubanik

    Joined:
    Nov 5, 2013
    Posts:
    4
    This path exists for sure
     
  4. bubanik

    bubanik

    Joined:
    Nov 5, 2013
    Posts:
    4
    i want to read my assetBundle like this


    Code (csharp):
    1.  
    2. string file = "file:///" +  Application.persistentDataPath + "/"+ "someasset.assetbundle";
    3. myWWW= new WWW(file);
    4. yield return myWWW;
    5. Assembly.setAsset(myWWW.assetBundle);
    But app stops running on
    with errors i mentioned above.

    This code works perfectly on ios and android, but not on windows 8.1
     
    Last edited: Nov 5, 2013
  5. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,905
    Please attach UnityPlayer.log, because I think you're not telling something here :)
     
  6. bubanik

    bubanik

    Joined:
    Nov 5, 2013
    Posts:
    4
    Code (csharp):
    1. Module information:
    2.  Built with Compiler Ver '170050727'
    3.  Built from '' branch
    4.  Version is '4.2.2f1 (54f0fc09defb)'
    5.  Debug build
    6.  Application type 'D3D11'
    7. PlayerConnection initialized from C:/_someApp/windows8(12)/someApp/bin/x86/Debug/AppX/Data (debug = 0)
    8. PlayerConnection initialized network socket : 0.0.0.0 55442
    9. Multi-casting "[IP] 10.1.5.193 [Port] 55442 [Flags] 2 [Guid] 1941534063 [EditorId] 3893882824 [Version] 1048832 [Id] MetroPlayerX86(user-win8.spb.app.local) [Debug] 0" to [225.0.0.222:54997]...
    10. Failed to find Arial.ttf
    11.  
    12. (Filename: C:/BuildAgent/work/ea95e74f6e5f192d/Runtime/Misc/ResourceManager.cpp Line: 1032)
    13.  
    14. GfxDevice: creating device client; threaded=1
    15. Direct3D:
    16.     Version:  Direct3D 11.0 [level 11.0]
    17.     Renderer: NVIDIA GeForce GT 610  (ID=0x104a)
    18.     Vendor:   NVIDIA
    19.     VRAM:     972 MB
    20. Initialize engine version: 4.2.2f1 (54f0fc09defb)
    21. file:///C:/_someApp/windows8(12)/someApp/bin/x86/Debug/AppX/Data/StreamingAssets/info.xml  FROM
    22.  
    23. (Filename: C:/BuildAgent/work/ea95e74f6e5f192d/Runtime/ExportGenerated/MetroSupport/UnityEngineDebug.cpp Line: 63)
    24.  
    25. C:/Users/user/AppData/Local/Packages/ru.app.someApp_kx5z7px8ckg18/LocalState\info.xml WHERE
    26.  
    27. (Filename: C:/BuildAgent/work/ea95e74f6e5f192d/Runtime/ExportGenerated/MetroSupport/UnityEngineDebug.cpp Line: 63)
    28.  
    29. file:///C:/Users/user/AppData/Local/Packages/ru.app.someApp_kx5z7px8ckg18/LocalState/ru.app.someApp.someApp.assetbundle MODEL LOADING FROM HERE +++++++++++++++++++++
    30.  
    31. (Filename: C:/BuildAgent/work/ea95e74f6e5f192d/Runtime/ExportGenerated/MetroSupport/UnityEngineDebug.cpp Line: 63)
    32.  
    33. You are trying to load data from a www stream which had the following error when downloading.
    34. file:///C:/Users/user/AppData/Local/Packages/ru.app.someApp_kx5z7px8ckg18/LocalState/ru.app.someApp.someApp.assetbundle cannot be loaded
    35.  
    36. (Filename: C:/BuildAgent/work/ea95e74f6e5f192d/PlatformDependent/MetroPlayer/WWWMetro.cpp Line: 504)
    37.  
    38. Unable to determine the audio type from the URL (file:///C:/Users/user/AppData/Local/Packages/ru.app.someApp_kx5z7px8ckg18/LocalState/ru.app.someApp.someApp.assetbundle) . Please specify the type.
    39.  
    40. (Filename: C:/BuildAgent/work/ea95e74f6e5f192d/Runtime/Audio/AudioClip.cpp Line: 118)
    41.  
    42. You are trying to load data from a www stream which had the following error when downloading.
    43. file:///C:/Users/user/AppData/Local/Packages/ru.app.someApp_kx5z7px8ckg18/LocalState/ru.app.someApp.someApp.assetbundle cannot be loaded
    44.  
    45. (Filename: C:/BuildAgent/work/ea95e74f6e5f192d/PlatformDependent/MetroPlayer/WWWMetro.cpp Line: 504)
    46.  
    47. You are trying to load data from a www stream which had the following error when downloading.
    48. file:///C:/Users/user/AppData/Local/Packages/ru.app.someApp_kx5z7px8ckg18/LocalState/ru.app.someApp.someApp.assetbundle cannot be loaded
    49.  
    50. (Filename: C:/BuildAgent/work/ea95e74f6e5f192d/PlatformDependent/MetroPlayer/WWWMetro.cpp Line: 504)
    51.  
    52. You are trying to load data from a www stream which had the following error when downloading.
    53. file:///C:/Users/user/AppData/Local/Packages/ru.app.someApp_kx5z7px8ckg18/LocalState/ru.app.someApp.someApp.assetbundle cannot be loaded
    54.  
    55. (Filename: C:/BuildAgent/work/ea95e74f6e5f192d/PlatformDependent/MetroPlayer/WWWMetro.cpp Line: 504)
    56.  
    57. You are trying to load data from a www stream which had the following error when downloading.
    58. file:///C:/Users/user/AppData/Local/Packages/ru.app.someApp_kx5z7px8ckg18/LocalState/ru.app.someApp.someApp.assetbundle cannot be loaded
    59.  
    60. (Filename: C:/BuildAgent/work/ea95e74f6e5f192d/PlatformDependent/MetroPlayer/WWWMetro.cpp Line: 504)
    61.  
    62.