Lagrange Interpolation for finite field GF(2^8), for Secret Reconstruction
I now see your problem; it's more fundamental than what my previous answer assumed.  You state:

Now the same method should work for finite field GF(2^8) as long as the arithmetic are replaced with finite field arithmetic. However this is not the case

where you interpret &quot;should work&quot; as &quot;coming up with the exact same answer&quot;.
Actually, that's not the case.  Your original example appears to be designed in the infinite field $Q$ (or some superfield); you then use the exact same shares, reinterpret them as $GF(2^8)$ points (in some unspecified representation), and then are confused that answers you get aren't precisely the same.
$Q$ and $GF(2^8)$ are both fields, but they are about as unlike as fields can get.  For example:

$2+2=4$  (in the field $Q$)
$2+2=0$  (in the field $GF(2^8)$)
$3 \times 3 = 9$  (in the field $Q$)
$3 \times 3 = 5$  (in the field $GF(2^8)$, in the most common representation)

Your original shares $(1, 17)$, $(2, 34)$, $(3, 61)$ were computed in $Q$; if they were computed in $GF(2^8)$, they would have lhad different values.  Therefore, it is not suprising that if you reconstruct them in a field other than what they were computed in, you'll come up with a different answer.  I recomputed your shares using the original polynomial (assuming a polynomial representation of $GF(2^8)$), and came up with the values $(1, 13)$, $(2, 26)$, $(3, 29)$
To test your code, you'll need to come up with your own shares, computing in the field you're using to reconstruct.
(You'll also need to fix up your multiplication logic, in case one of the shares happen to be the value 0)