VideoHelp Forum
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Someone posted this asking for help. This wrong protobuf version is such common issue, it needs its own thread.
    Image
    [Attachment 69911 - Click to enlarge]


    It mainly happens to users of WKS_KEYS or Frida using dumper.py who update or first install protobuf version 4.x.x.
    That new version is incompatible with a piece of code within WKS-KEYS and Dumper There are two ways of correcting it.

    There is a mis-match between the version of the module 'protobuf' (version 4.22.1 is current) and the version of protobuf that was used to create the file wv_proto2_pb2.py (version 3.20.3) used in WKS_KEYS or dumper. Both use wv_proto2_pb2.py.

    One solution is to downgrade the protobuf module
    Code:
    pip install protobuf==3.20.3
    will do it.

    The other solution is a little more effort but should you wish to use the pywidevine python module to get keys, as well as use WKS-KEYS, it is the better way.
    Code:
    pip install protobuf=>4.22.1
    In the WKS-KEYS folder is the path WKS-KEYS/pywidevine/L3/cdm/formats Within the formats folder are two files, the compiled protobuf that is causing the issue, wv_proto2_pb2.py and a file that allows us to create a new one - wv_proto2.proto
    Similarly if your issue it with dumper the path you need is dumper-main/Helpers/wv_proto2_pb2.py but dumper DOES NOT include a proto script needed for compiling. However WKS-KEYS does.

    I'll just run through updating wv_proto2_pb2.py from WKS-KEYS, but the same process works for dumper too.

    First you need to install the compiler for protobuffers called protoc. My Linux system suggested this protobuf-compiler.x86_64 . After installation a check just calling protoc on the command line gave me the help response.

    In a terminal window, change directory to WKS-KEYS/pywidevine/L3/cdm/formats and rename wv_proto2_pb2.py to wv_proto2_pb2.py.old in case you need to revert for any reason.
    In the same folder run
    Code:
    protoc -I=./ --python_out=./ wv_proto2.proto
    and it will compile a new version using the instructions in wv_proto2.proto. It is all very fast.

    Here is my version compiled for protobuf version 4 https://anonfiles.com/caY5k7g2zc/wv_proto2_pb2_py. It should work everywhere just rename your old version as a backup and replace with this in the WKS-KEYS/pywidevine/L3/cdm/formats folder.
    Last edited by A_n_g_e_l_a; 22nd Mar 2023 at 07:27. Reason: Anon files
    Quote Quote  
  2. thank you A_n_g_e_l_a , and another method is creating a python env , and pip install protobuf 4.xx in the env environment.
    Quote Quote  
  3. thank you A_n_g_e_l_a , very helpful post, worked like a treat
    Quote Quote  
  4. Member k2000's Avatar
    Join Date
    Jan 2022
    Location
    Canada
    Search PM
    if I replace my file with your file I get the same error.
    Quote Quote  
  5. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by k2000 View Post
    if I replace my file with your file I get the same error.
    Then check your work and maybe re-download. You can always compile a new protobuf yourself using the instructions given if you have any doubts about the 'file'.
    Quote Quote  
  6. Member k2000's Avatar
    Join Date
    Jan 2022
    Location
    Canada
    Search PM
    Originally Posted by A_n_g_e_l_a View Post
    Originally Posted by k2000 View Post
    if I replace my file with your file I get the same error.
    Then check your work and maybe re-download. You can always compile a new protobuf yourself using the instructions given if you have any doubts about the 'file'.
    I have no doubts about your file, I was only asking the question why I was getting the same error.

    For compiled myself I find it quite complicated. Works on Windows for compiled?.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!